roles/nginx: Use explicity booleans for tests instead of "yes" and "no"

Better to be explict with booleans rather than being confused when
you mix up yes and "yes" with Ansible/Python testing of conditionals.
This commit is contained in:
2016-08-17 12:55:14 +03:00
parent de704a917f
commit aa8735e0ea
4 changed files with 91 additions and 91 deletions

View File

@ -22,13 +22,13 @@
- 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 force=yes
when: item.has_wordpress == 'yes'
when: item.has_wordpress == True
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'
when: item.has_wordpress == True
with_items: "{{ nginx_vhosts }}"
tags: wordpress