From 92713cb19df611433c1cef447d65b2f4e8df0604 Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Thu, 21 Apr 2022 11:45:46 +0100 Subject: [PATCH] typo fixed --- tasks/checks.yml | 3 +++ tasks/pkg_checks.yml | 2 +- tasks/pool_check.yml | 14 +++++++------- tasks/sapi_absent_checks.yml | 1 + tasks/sapi_module_checks.yml | 2 +- tasks/sapi_state_checks.yml | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/tasks/checks.yml b/tasks/checks.yml index 40ca0f2..801fe68 100644 --- a/tasks/checks.yml +++ b/tasks/checks.yml @@ -6,6 +6,7 @@ assert: that: - php_allow_local_infile is not defined + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Check that variables are booleans assert: @@ -16,12 +17,14 @@ - php_opcache_enable | type_debug == "bool" - php_opcache_validate_permission | type_debug == "bool" - php_opcache_validate_root | type_debug == "bool" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Check that the distro is Debian Bookworm, Bullseye, Buster or Stretch or Ubuntu Jammy, Focal or Bionic assert: that: - ansible_distribution_release is defined - ansible_distribution_release is regex("^stretch|buster|bullseye|bookworm|focal|bionic|jammy$") + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" fail_msg: "The Linux distro {{ ansible_distribution }} {{ ansible_distribution_release }} is not supported by this role" - name: Generate an array of existing PHP versions diff --git a/tasks/pkg_checks.yml b/tasks/pkg_checks.yml index 64c5e51..4fe2f9c 100644 --- a/tasks/pkg_checks.yml +++ b/tasks/pkg_checks.yml @@ -6,7 +6,7 @@ assert: that: - pkg not in php_versions[version].packages_absent - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" fail_msg: "Package {{ pkg }} is set to be both present and absent at the same time for PHP {{ version }}" loop: "{{ php_versions[version].packages_present }}" loop_control: diff --git a/tasks/pool_check.yml b/tasks/pool_check.yml index d5b9273..bab3d5d 100644 --- a/tasks/pool_check.yml +++ b/tasks/pool_check.yml @@ -17,7 +17,7 @@ assert: that: - php_pm is regex("^static|ondemand|dynamic$") - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Ensure that pm.max_children is defined, numeric and is greater than 1 assert: @@ -25,7 +25,7 @@ - php_pm_max_children is defined - ( php_pm_max_children | string ) is regex("^[0-9]+$") - ( php_pm_max_children | int ) >= 1 - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Conditional pm dynamic pool checks block: @@ -39,7 +39,7 @@ - ( php_pm_min_spare_servers | string ) is regex("^[0-9]+$") - php_pm_max_spare_servers is defined - ( php_pm_max_spare_servers | string ) is regex("^[0-9]+$") - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Ensure that pm.max_children, pm.start_servers, pm.min_spare_servers and pm.max_spare_servers are greater than or equal to 1 assert: @@ -48,7 +48,7 @@ - php_pm_start_servers | int >= 1 - php_pm_min_spare_servers | int >= 1 - php_pm_max_spare_servers | int >= 1 - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Ensure that pm.max_children is greater than or equal to pm.start_servers, pm.min_spare_servers and pm.max_spare_servers assert: @@ -56,20 +56,20 @@ - php_pm_max_children | int >= php_pm_start_servers | int - php_pm_max_children | int >= php_pm_min_spare_servers | int - php_pm_max_children | int >= php_pm_max_spare_servers | int - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Ensure that pm.start_servers is be greater than pm.min_spare_servers and less than or equal to pm.max_spare_servers assert: that: - php_pm_start_servers | int >= php_pm_min_spare_servers | int - php_pm_start_servers | int <= php_pm_max_spare_servers | int - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" - name: Ensure that pm.max_spare_servers is greater than pm.min_spare_servers assert: that: - php_pm_max_spare_servers | int >= php_pm_min_spare_servers | int - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" when: php_pm == "dynamic" diff --git a/tasks/sapi_absent_checks.yml b/tasks/sapi_absent_checks.yml index d4f8d53..cdb663a 100644 --- a/tasks/sapi_absent_checks.yml +++ b/tasks/sapi_absent_checks.yml @@ -6,6 +6,7 @@ assert: that: - sapi.value.state == "absent" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" fail_msg: "SAPI {{ sapi.key }} is not set to be absent for PHP {{ version }}, yet PHP {{ version }} is set to be removed." loop: "{{ php_versions[version].sapis | dict2items }}" loop_control: diff --git a/tasks/sapi_module_checks.yml b/tasks/sapi_module_checks.yml index 90567d1..02dc698 100644 --- a/tasks/sapi_module_checks.yml +++ b/tasks/sapi_module_checks.yml @@ -6,7 +6,7 @@ assert: that: - mod not in sapi.value.modules_disabled - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" fail_msg: "The PHP module {{ mod }} appears to in both the modules_enabled and modules_disabled arrays for SAPI {{ sapi.key }} for PHP version {{ version }}" loop: "{{ sapi.value.modules_enabled }}" loop_control: diff --git a/tasks/sapi_state_checks.yml b/tasks/sapi_state_checks.yml index 6c4f161..fe90c41 100644 --- a/tasks/sapi_state_checks.yml +++ b/tasks/sapi_state_checks.yml @@ -11,7 +11,7 @@ assert: that: - sapi.value.state == "absent" - quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" + quiet: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}" fail_msg: "SAPI {{ sapi.key }} is not set to be absent for PHP {{ version }}, yet PHP {{ version }} is set to be removed." # loop: # - apache2 -- GitLab