From b2543c02a07766b84d556a60c7fc1010f9dc3038 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 20 Nov 2018 23:41:03 +0100 Subject: [PATCH] use condition instead of empty default list --- tasks/filesystem.yml | 5 ++++- tasks/users_groups.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/filesystem.yml b/tasks/filesystem.yml index 0c0ae2e..02964a9 100644 --- a/tasks/filesystem.yml +++ b/tasks/filesystem.yml @@ -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 diff --git a/tasks/users_groups.yml b/tasks/users_groups.yml index 3453ef7..6ac6f34 100644 --- a/tasks/users_groups.yml +++ b/tasks/users_groups.yml @@ -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