forked from ccchb/ansible
roles/user_mgmt: fix state for ssh_keys
This commit is contained in:
parent
48541be6dd
commit
1b35ee4de3
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@
|
||||||
user: "{{ item.0.key }}"
|
user: "{{ item.0.key }}"
|
||||||
key: "{{ item.1 }}"
|
key: "{{ item.1 }}"
|
||||||
state: present
|
state: present
|
||||||
when: (_user_mgmt[item.0.key].created | default(user_mgmt_default_state)) == "present"
|
when: (_user_mgmt[item.0.key].state | default(user_mgmt_default_state)) == "present"
|
||||||
loop: "{{ _user_mgmt |dict2items | subelements('value.ssh_key.present') }}"
|
loop: "{{ _user_mgmt |dict2items | subelements('value.ssh_key.present') }}"
|
||||||
|
|
||||||
- name: Remove ssh-key to user
|
- name: Remove ssh-key to user
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
user: "{{ item.0.key }}"
|
user: "{{ item.0.key }}"
|
||||||
key: "{{ item.1 }}"
|
key: "{{ item.1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: (_user_mgmt[item.0.key].created | default(user_mgmt_default_state)) == "present"
|
when: (_user_mgmt[item.0.key].state | default(user_mgmt_default_state)) == "present"
|
||||||
loop: "{{ _user_mgmt |dict2items | subelements('value.ssh_key.absent') }}"
|
loop: "{{ _user_mgmt |dict2items | subelements('value.ssh_key.absent') }}"
|
||||||
|
|
||||||
- name: Remove user
|
- name: Remove user
|
||||||
|
|
Loading…
Reference in a new issue