use condition instead of empty default list

This commit is contained in:
Robert Kaussow 2018-11-20 23:41:03 +01:00
parent e78a79ab68
commit b2543c02a0
2 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,9 @@
permissions: "{{ item.permissions }}"
state: "{{ item.state | default('query') }}"
recursive: "{{ item.recursive | default('no') }}"
with_items: "{{ ucs_filesystem_acl | default([]) }}"
with_items: "{{ ucs_filesystem_acl }}"
loop_control:
label: "{{ item.path }}"
when: ucs_filesystem_acl is defined
become: True
become_user: root

View File

@ -6,6 +6,9 @@
subpath: "{{ item.subpath | default(omit) }}"
ou: "{{ item.ou | default(omit) }}"
state: "{{ item.state | default('present') }}"
with_items: "{{ ucs_system_groups | default([]) }}"
with_items: "{{ ucs_system_groups }}"
loop_control:
label: "{{ item.name }}"
when: ucs_system_groups is defined
become: True
become_user: root