zsh and root check for file confilct
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
36a7f7ff39
commit
16b7760ae4
@ -23,14 +23,21 @@
|
|||||||
|
|
||||||
- name: test if user bash rc exist
|
- name: test if user bash rc exist
|
||||||
stat:
|
stat:
|
||||||
path: /home/{{user.name}}/.bashrc
|
path: "{{ item }}"
|
||||||
register: links
|
register: links
|
||||||
|
with_items:
|
||||||
|
- /home/{{user.name}}/.bashrc
|
||||||
|
- /home/{{user.name}}/.zshrc
|
||||||
|
- /root/.bashrc
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: delete bashrc if needed
|
- name: delete bashrc if needed
|
||||||
file:
|
file:
|
||||||
path: "{{ links.stat.path }}"
|
path: "{{ item.stat.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: links.stat.islnk is defined and not links.stat.islnk
|
when: item.stat.islnk is defined and not item.stat.islnk
|
||||||
|
with_items: "{{links.results }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: apply stow config
|
- name: apply stow config
|
||||||
shell: stow *
|
shell: stow *
|
||||||
@ -43,4 +50,4 @@
|
|||||||
args:
|
args:
|
||||||
chdir: /home/{{user.name}}/conf2
|
chdir: /home/{{user.name}}/conf2
|
||||||
when: config_download.changed == true
|
when: config_download.changed == true
|
||||||
become: yes
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user