diff --git a/tasks/checks.yml b/tasks/checks.yml index 40ca0f2bf89e3551595930453a8fdf840457ae8e..801fe683488e8baa905649c0600088afbcc56c6d 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 64c5e5186b39a40db9011ee5642043a85397af46..4fe2f9c65b38a7ad2f1b5898983b735ee12c4706 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 d5b92732d4cd1aee57ad34abbebbd4d5ff3799d5..bab3d5d56ccecc01311a363566a9e03e2383738f 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 d4f8d53d3c4a9889ed1fb1461126b67e8c042e30..cdb663aed5555fc343dbac71092ea5c076f66e2f 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 90567d110ca547790a7110c2ec077962f30f847b..02dc698ebfaed601d6e4c7d53095231534b4f379 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 6c4f16145a9beca661549f6502a5ad450bdf12aa..fe90c41c9889a5fd8d1fb7a64679d03095101cdc 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