From f945ffba2dbd066173b15ad3fab69f7c81343447 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Thu, 16 Nov 2017 13:09:35 +0100 Subject: [PATCH] Sanitize jinja2 variables --- tasks/configure.yml | 8 ++++---- tasks/pullcerts.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 58eba82..730eefa 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -21,7 +21,7 @@ owner='root' group='root' mode='644' - with_items: '{{ groups.webserver }}' + with_items: '{{ groups.webserver|default([]) }}' notify: "Check HAProxy Config" - name: "Create host ssl lists" @@ -31,7 +31,7 @@ owner='root' group='root' mode='644' - with_items: '{{ groups.webserver }}' + with_items: '{{ groups.webserver|default([]) }}' notify: "Check HAProxy Config" - name: "Create host path lists" @@ -41,7 +41,7 @@ group='root' mode='644' state='touch' - with_items: '{{ groups.webserver }}' + with_items: '{{ groups.webserver|default([]) }}' changed_when: false - name: "Create use bigpipe host lists" @@ -69,7 +69,7 @@ group='root' mode='644' state='touch' - with_items: '{{ groups.webserver }}' + with_items: '{{ groups.webserver|default([]) }}' changed_when: false - name: "Update blacklists" diff --git a/tasks/pullcerts.yml b/tasks/pullcerts.yml index 5e9e568..4ec71da 100644 --- a/tasks/pullcerts.yml +++ b/tasks/pullcerts.yml @@ -3,7 +3,7 @@ - name: "Find out active proxy" set_fact: proxy_active_host={{ item }} - with_items: '{{ groups.proxyserver }}' + with_items: '{{ groups.proxyserver|default([]) }}' when: hostvars[item].proxy_active|default(true) - name: "Set directory permissions to current user" -- GitLab