diff --git a/roles/mariadb/tasks/main.yml b/roles/mariadb/tasks/main.yml index 364a0a3..026b491 100644 --- a/roles/mariadb/tasks/main.yml +++ b/roles/mariadb/tasks/main.yml @@ -35,13 +35,13 @@ - name: Create WordPress database(s) mysql_db: db={{ item.wordpress_db_name }} state=present encoding=utf8mb4 - with_items: wordpress_blogs + with_items: "{{ wordpress_blogs }}" when: wordpress_blogs is defined tags: mariadb - name: Create WordPress user(s) mysql_user: name={{ item.wordpress_db_user }} password={{ item.wordpress_db_pass }} priv={{ item.wordpress_db_name }}.*:ALL state=present - with_items: wordpress_blogs + with_items: "{{ wordpress_blogs }}" when: wordpress_blogs is defined tags: mariadb diff --git a/roles/nginx/tasks/vhosts.yml b/roles/nginx/tasks/vhosts.yml index 75a725e..a7b4792 100644 --- a/roles/nginx/tasks/vhosts.yml +++ b/roles/nginx/tasks/vhosts.yml @@ -2,7 +2,7 @@ - name: Configure https vhosts template: src=vhost.conf.j2 dest={{ nginx_confd_path }}/{{ item.domain_name }}.conf mode=0644 owner=root group=root - with_items: nginx_vhosts + with_items: "{{ nginx_vhosts }}" notify: - reload nginx @@ -18,18 +18,18 @@ - name: Create vhost document roots file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory mode=0755 owner=nginx group=nginx - with_items: nginx_vhosts + with_items: "{{ nginx_vhosts }}" - name: Install WordPress git: repo=https://github.com/WordPress/WordPress.git dest={{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress version={{ item.wordpress_version }} depth=1 when: item.has_wordpress == 'yes' - with_items: nginx_vhosts + with_items: "{{ nginx_vhosts }}" tags: wordpress - name: Fix WordPress directory permissions file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=yes when: item.has_wordpress == 'yes' - with_items: nginx_vhosts + with_items: "{{ nginx_vhosts }}" tags: wordpress # vim: set ts=2 sw=2: diff --git a/roles/php5-fpm/tasks/main.yml b/roles/php5-fpm/tasks/main.yml index 6faaa8b..b27335f 100644 --- a/roles/php5-fpm/tasks/main.yml +++ b/roles/php5-fpm/tasks/main.yml @@ -11,7 +11,7 @@ - name: Copy php5-fpm pool config template: src=pool.conf.j2 dest=/etc/php5/fpm/pool.d/{{ item.domain_name }}.conf owner=root group=root mode=0644 - with_items: nginx_vhosts + with_items: "{{ nginx_vhosts }}" when: nginx_vhosts is defined notify: restart php5-fpm tags: php5-fpm