with_items to loop

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-01-26 08:30:26 +00:00
parent 904d7811d4
commit 8694bfde75
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9
4 changed files with 8 additions and 14 deletions

View file

@ -6,8 +6,7 @@
ansible.builtin.user:
name: "{{ item.id }}"
shell: /usr/sbin/nologin
with_items:
- "{{ rhel9cis_passwd }}"
loop: "{{ rhel9cis_passwd }}"
when:
- item.id != "root"
- item.id != "sync"