From e1913297a962cddd2d764dbad3555828634c7f37 Mon Sep 17 00:00:00 2001 From: Andrea Cimbalo Date: Sat, 20 Aug 2016 01:30:04 +0200 Subject: [PATCH] set config_names default --- roles/apache2/defaults/main.yml | 1 + roles/apache2/tasks/main.yaml | 2 -- roles/nginx/defaults/main.yml | 1 + roles/nginx/tasks/main.yaml | 2 -- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/apache2/defaults/main.yml b/roles/apache2/defaults/main.yml index 24770e7..fecacbd 100644 --- a/roles/apache2/defaults/main.yml +++ b/roles/apache2/defaults/main.yml @@ -1,3 +1,4 @@ --- php: false user_dir: false + config_names: [] diff --git a/roles/apache2/tasks/main.yaml b/roles/apache2/tasks/main.yaml index 414c99c..b7ed605 100644 --- a/roles/apache2/tasks/main.yaml +++ b/roles/apache2/tasks/main.yaml @@ -26,7 +26,6 @@ template: src: ../../{{ parent_role_path }}/templates/{{ item }}.apache2.j2 dest: /etc/apache2/sites-available/{{ item }} - when: config_names is defined with_items: "{{ config_names }}" - name: enable apache2 configurations @@ -35,7 +34,6 @@ dest: "/etc/apache2/sites-enabled/{{ item }}" state: link with_items: "{{ config_names }}" - when: config_names is defined notify: restart apache2 - block: diff --git a/roles/nginx/defaults/main.yml b/roles/nginx/defaults/main.yml index 51b64ed..18488bd 100644 --- a/roles/nginx/defaults/main.yml +++ b/roles/nginx/defaults/main.yml @@ -1,3 +1,4 @@ --- is_proxy: false php: false + config_names: [] diff --git a/roles/nginx/tasks/main.yaml b/roles/nginx/tasks/main.yaml index a45bbb5..daa4df5 100644 --- a/roles/nginx/tasks/main.yaml +++ b/roles/nginx/tasks/main.yaml @@ -36,7 +36,6 @@ 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 - name: enable nginx configurations file: @@ -44,5 +43,4 @@ dest: "/etc/nginx/sites-enabled/{{ item }}.conf" state: link with_items: "{{ config_names }}" - when: config_names is defined notify: restart nginx