roles: strict truthy values

According to Ansible we can use yes, true, True, "or any quoted st-
ring" for a boolean true, but ansible-lint wants us to use either
true or false.

See: https://chronicler.tech/red-hat-ansible-yes-no-and/
This commit is contained in:
2022-09-10 22:33:19 +03:00
parent 95d0005978
commit ffe7a872dd
25 changed files with 314 additions and 314 deletions

View File

@ -79,8 +79,8 @@
ansible.builtin.systemd:
name: renew-letsencrypt.timer
state: started
enabled: yes
daemon_reload: yes
enabled: true
daemon_reload: true
when: (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '=='))
or (ansible_distribution == 'Debian' and ansible_distribution_version is version('11', '=='))

View File

@ -11,7 +11,7 @@
- name: Update apt cache
ansible.builtin.apt:
update_cache: yes
update_cache: true
when:
add_nginx_apt_key is changed or
add_nginx_apt_repository is changed
@ -66,7 +66,7 @@
tags: nginx
- name: Start and enable nginx service
ansible.builtin.systemd: name=nginx state=started enabled=yes
ansible.builtin.systemd: name=nginx state=started enabled=true
tags: nginx
- name: Configure Let's Encrypt

View File

@ -2,12 +2,12 @@
- block:
- name: Install WordPress
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=yes
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: item.has_wordpress is defined and item.has_wordpress
loop: "{{ nginx_vhosts }}"
- name: Fix WordPress directory permissions
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=yes
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=true
when: item.has_wordpress is defined and item.has_wordpress
loop: "{{ nginx_vhosts }}"
tags: wordpress