homeserver/roles/mgrote.dotfiles/tasks/main.yml

34 lines
792 B
YAML

- name: create repo-directory
become: true
file:
path: "{{ dotfiles_local_repo_directory }}"
state: directory
owner: "{{ dotfiles_user }}"
group: "{{ dotfiles_user }}"
recurse: yes
mode: 0644
# noqa [401]
- name: clone repository
become: true
git:
repo: "{{ dotfiles_remote_repo }}"
dest: "{{ dotfiles_local_repo_directory }}"
clone: yes
force: yes
depth: 1
version: HEAD
tags:
- skip_ansible_lint
- name: create symlinks for files from repo
become: true
file:
src: "{{ dotfiles_local_repo_directory }}/{{ item }}"
dest: "{{ dotfiles_link_target }}/{{ item }}"
owner: "{{ dotfiles_user }}"
group: "{{ dotfiles_user }}"
mode: 0644
state: link
force: yes
with_items: "{{ dotfiles_files_to_copy }}"