item.state is not always defined.
This commit is contained in:
parent
9f2eaa9b80
commit
680cfec5af
|
@ -68,7 +68,7 @@
|
|||
loop: '{{ users_system_users }}'
|
||||
when:
|
||||
- item.ssh_key is defined
|
||||
- item.state == "present"
|
||||
- item.state is defined and item.state != "present"
|
||||
|
||||
- name: Add the admin users to the sudoers group
|
||||
ansible.builtin.user:
|
||||
|
@ -78,7 +78,7 @@
|
|||
loop: '{{ users_system_users }}'
|
||||
when:
|
||||
- item.admin
|
||||
- item.state == "present"
|
||||
- item.state is defined and item.state != "present"
|
||||
|
||||
- name: Manage additional users
|
||||
tags: users
|
||||
|
@ -110,7 +110,7 @@
|
|||
loop: '{{ users_system_users_adjunct }}'
|
||||
when:
|
||||
- item.ssh_key is defined
|
||||
- item.state == "present"
|
||||
- item.state is defined and item.state != "present"
|
||||
|
||||
- name: Add the additional admin users to the sudoers group
|
||||
ansible.builtin.user:
|
||||
|
@ -120,7 +120,7 @@
|
|||
loop: '{{ users_system_users_adjunct }}'
|
||||
when:
|
||||
- item.admin
|
||||
- item.state == "present"
|
||||
- item.state is defined and item.state != "present"
|
||||
|
||||
- name: Configure passwordless sudo
|
||||
tags: ['users', 'sudo_wheel']
|
||||
|
|
Loading…
Reference in New Issue