Fix the users existence conditional.

This commit is contained in:
Andrea Dell'Amico 2024-04-19 15:24:59 +02:00
parent f502aaac81
commit 84205634a1
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@
loop: '{{ users_system_users }}'
when:
- item.ssh_key is defined
- item.state is not defined or item.state != "present"
- item.state is not defined or item.state == "present"
- name: Add the admin users to the sudoers group
ansible.builtin.user:
@ -79,7 +79,7 @@
loop: '{{ users_system_users }}'
when:
- item.admin is defined and item.admin
- item.state is not defined or item.state != "present"
- item.state is not defined or item.state == "present"
- name: Manage additional users
tags: users