28 lines
678 B
YAML
28 lines
678 B
YAML
---
|
|
# tasks file for user_config
|
|
- name: Clone user repository
|
|
ansible.builtin.git:
|
|
dest: "{{ user_config_home }}/conf2"
|
|
repo: "{{ user_config_repo }}"
|
|
clone: true
|
|
recursive: true
|
|
force: false
|
|
update: true
|
|
accept_hostkey: true
|
|
notify: Apply stow config
|
|
|
|
- name: Test if user bash rc exist
|
|
ansible.builtin.stat:
|
|
path: '{{ item }}'
|
|
register: links
|
|
with_items:
|
|
- /{{ user_config_home }}/.bashrc
|
|
- /{{ user_config_home }}/.zshrc
|
|
|
|
- name: Delete bashrc if needed
|
|
ansible.builtin.file:
|
|
path: '{{ item.stat.path }}'
|
|
state: absent
|
|
when: item.stat.islnk is defined and not item.stat.islnk
|
|
with_items: '{{ links.results }}'
|