roles: don't compare literal true and false

I changed these yesterday when editing the truthy values, but acco-
rding to ansible-link we can just rely on them being true or false
without comparing.
This commit is contained in:
Alan Orth 2022-09-11 08:39:59 +03:00
parent 0240897b1b
commit 399585f4e7
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 4 additions and 4 deletions

View File

@ -5,14 +5,14 @@
ansible.builtin.git: repo=https://github.com/WordPress/WordPress.git dest={{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress version={{ item.wordpress_version }} depth=1 force=true ansible.builtin.git: repo=https://github.com/WordPress/WordPress.git dest={{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress version={{ item.wordpress_version }} depth=1 force=true
when: when:
- item.has_wordpress is defined - item.has_wordpress is defined
- item.has_wordpress == true - item.has_wordpress
loop: "{{ nginx_vhosts }}" loop: "{{ nginx_vhosts }}"
- name: Fix WordPress directory permissions - name: Fix WordPress directory permissions
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=true ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=true
when: when:
- item.has_wordpress is defined - item.has_wordpress is defined
- item.has_wordpress == true - item.has_wordpress
loop: "{{ nginx_vhosts }}" loop: "{{ nginx_vhosts }}"
tags: wordpress tags: wordpress

View File

@ -30,6 +30,6 @@
notify: reload php7.3-fpm notify: reload php7.3-fpm
tags: php-fpm tags: php-fpm
when: install_php == true when: install_php
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2:

View File

@ -31,6 +31,6 @@
notify: reload php7.4-fpm notify: reload php7.4-fpm
tags: php-fpm tags: php-fpm
when: install_php == true when: install_php
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2: