From bdf0a90396a441c0834efc878eb1e7487311e22f Mon Sep 17 00:00:00 2001 From: Lorenzo Date: Fri, 18 Nov 2016 12:27:59 +0100 Subject: [PATCH] bug-fix: handle empty config_files` --- roles/nginx/tasks/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/nginx/tasks/main.yaml b/roles/nginx/tasks/main.yaml index a674472..1b1e633 100644 --- a/roles/nginx/tasks/main.yaml +++ b/roles/nginx/tasks/main.yaml @@ -71,6 +71,7 @@ src: "roles/{{ parent_role_path }}/templates/{{ item }}.conf.nginx.j2" dest: "/etc/nginx/sites-available/{{ item }}.conf" with_items: "{{ config_names }}" + when: config_names is defined and item|bool - name: enable nginx configuration custom templates file: @@ -78,6 +79,7 @@ dest: "/etc/nginx/sites-enabled/{{ item }}.conf" state: link with_items: "{{ config_names }}" + when: config_names is defined and item|bool notify: restart nginx - name: generate nginx configurations from standard template