Add present / absent condition on bashrc and authorized_keys file
This commit is contained in:
parent
1470a277f3
commit
1feff6254c
|
@ -27,6 +27,7 @@
|
|||
group: "{{ item.name }}"
|
||||
mode: '0640'
|
||||
loop: "{{ users }}"
|
||||
when: item.state is not defined or item.state != "absent"
|
||||
tags:
|
||||
- create
|
||||
|
||||
|
@ -38,7 +39,7 @@
|
|||
group: "{{ item.name }}"
|
||||
mode: '0640'
|
||||
loop: "{{ users }}"
|
||||
when: item.authorized_keys is defined
|
||||
when: item.authorized_keys is defined and (item.state is not defined or item.state != "absent")
|
||||
tags:
|
||||
- create
|
||||
|
||||
|
|
Loading…
Reference in New Issue