Update some bare variables in with_items loops to use Ansible 2.0 syntax

See: https://docs.ansible.com/ansible/porting_guide_2.0.html

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2016-03-11 18:53:07 +02:00
parent 869d7f6c7e
commit 6a3b8f0918
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 7 additions and 7 deletions

View File

@ -35,13 +35,13 @@
- name: Create WordPress database(s) - name: Create WordPress database(s)
mysql_db: db={{ item.wordpress_db_name }} state=present encoding=utf8mb4 mysql_db: db={{ item.wordpress_db_name }} state=present encoding=utf8mb4
with_items: wordpress_blogs with_items: "{{ wordpress_blogs }}"
when: wordpress_blogs is defined when: wordpress_blogs is defined
tags: mariadb tags: mariadb
- name: Create WordPress user(s) - 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 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 when: wordpress_blogs is defined
tags: mariadb tags: mariadb

View File

@ -2,7 +2,7 @@
- name: Configure https vhosts - name: Configure https vhosts
template: src=vhost.conf.j2 dest={{ nginx_confd_path }}/{{ item.domain_name }}.conf mode=0644 owner=root group=root 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: notify:
- reload nginx - reload nginx
@ -18,18 +18,18 @@
- name: Create vhost document roots - name: Create vhost document roots
file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory mode=0755 owner=nginx group=nginx 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 - 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 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' when: item.has_wordpress == 'yes'
with_items: nginx_vhosts with_items: "{{ nginx_vhosts }}"
tags: wordpress tags: wordpress
- name: Fix WordPress directory permissions - name: Fix WordPress directory permissions
file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=yes file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=yes
when: item.has_wordpress == 'yes' when: item.has_wordpress == 'yes'
with_items: nginx_vhosts with_items: "{{ nginx_vhosts }}"
tags: wordpress tags: wordpress
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2:

View File

@ -11,7 +11,7 @@
- name: Copy php5-fpm pool config - 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 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 when: nginx_vhosts is defined
notify: restart php5-fpm notify: restart php5-fpm
tags: php5-fpm tags: php5-fpm