From e9eca74e8366667fd0c26e47368e1092fee4590a Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 6 Apr 2018 11:42:23 -0400 Subject: [PATCH] Add default value for log_dirs in os-log-dir-setup.yml There is no default value for log_dirs in the os-log-dir-setup.yml which means that any role that includes it without that value will crash and burn. We set a default here to protect us from breaking roles in the future if we forget to specifiy log_dirs on baremetal. Change-Id: I07bf9f4bce7bb53ecc305d260142e878797d6c04 Closes-Bug: #1761781 --- playbooks/common-tasks/os-log-dir-setup.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/common-tasks/os-log-dir-setup.yml b/playbooks/common-tasks/os-log-dir-setup.yml index 4065c4a166..5d8b331094 100644 --- a/playbooks/common-tasks/os-log-dir-setup.yml +++ b/playbooks/common-tasks/os-log-dir-setup.yml @@ -27,7 +27,7 @@ file: path: "{{ item.src }}" state: directory - with_items: "{{ log_dirs }}" + with_items: "{{ log_dirs|default([]) }}" when: is_metal | bool tags: - common-log @@ -40,7 +40,7 @@ group: "{{ item.group|default(omit) }}" state: "link" force: "yes" - with_items: "{{ log_dirs }}" + with_items: "{{ log_dirs|default([]) }}" when: is_metal | bool tags: - common-log