mirror of https://dev.ccchb.de/ccchb/ansible.git
roles/user_mgmt: fix state for ssh_keys
This commit is contained in:
parent
48541be6dd
commit
1b35ee4de3
|
@ -15,7 +15,7 @@
|
|||
user: "{{ item.0.key }}"
|
||||
key: "{{ item.1 }}"
|
||||
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') }}"
|
||||
|
||||
- name: Remove ssh-key to user
|
||||
|
@ -23,7 +23,7 @@
|
|||
user: "{{ item.0.key }}"
|
||||
key: "{{ item.1 }}"
|
||||
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') }}"
|
||||
|
||||
- name: Remove user
|
||||
|
|
Loading…
Reference in New Issue