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