diff --git a/tasks/main.yml b/tasks/main.yml index 97e4260..e0a5ef0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,13 +8,13 @@ - name: Install the nginx packages yum: name={{ item }} state=present - with_items: redhat_pkg + with_items: "{{ redhat_pkg }}" when: ansible_distribution == 'CentOS' tags: [packages,nginx] - name: Install the nginx packages apt: name={{ item }} state=present update_cache=yes - with_items: ubuntu_pkg + with_items: "{{ ubuntu_pkg }}" when: ansible_os_family == "Debian" tags: [packages,nginx] @@ -38,19 +38,19 @@ - name: Ensure auth_basic files created template: src=auth_basic.j2 dest=/etc/nginx/auth_basic/{{ item }} owner=root group={{nginx_group}} mode=0750 - with_items: nginx_auth_basic_files.keys() + with_items: "{{ nginx_auth_basic_files.keys() }}" tags: [configuration,nginx] - name: Create the configurations for sites template: src=site.conf.j2 dest=/etc/nginx/sites-available/{{ item }}.conf - with_items: nginx_sites.keys() + with_items: "{{ nginx_sites.keys() }}" notify: - Reload nginx tags: [configuration,nginx] - name: Create links for sites-enabled file: state=link src=/etc/nginx/sites-available/{{ item }}.conf dest=/etc/nginx/sites-enabled/{{ item }}.conf - with_items: nginx_sites.keys() + with_items: "{{ nginx_sites.keys() }}" notify: - Reload nginx tags: [configuration,nginx] @@ -64,7 +64,7 @@ - name: Create the configurations for independante config file template: src=config.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf - with_items: nginx_configs.keys() + with_items: "{{ nginx_configs.keys() }}" notify: - Reload nginx tags: [configuration,nginx]