Skip to content
Snippets Groups Projects
Commit 83c2ba68 authored by Chris Croome's avatar Chris Croome
Browse files

make assert run in quite mode when not -v

parent 1a220589
No related branches found
No related tags found
1 merge request!1Merge Sury
Pipeline #20920 passed
......@@ -6,6 +6,7 @@
assert:
that:
- pkg not in php_versions[version].packages_absent
quite: "{% 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:
......
......@@ -17,6 +17,7 @@
assert:
that:
- php_pm is regex("^static|ondemand|dynamic$")
quite: "{% if ansible_verbosity == 0 %}true{% else %}false{% endif %}"
- name: Ensure that pm.max_children is defined, numeric and is greater than 1
assert:
......@@ -24,6 +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 %}"
- name: Conditional pm dynamic pool checks
block:
......@@ -37,6 +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 %}"
- 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:
......@@ -45,6 +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 %}"
- 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:
......@@ -52,17 +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 %}"
- 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 %}"
- 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 %}"
when: php_pm == "dynamic"
......
......@@ -6,6 +6,7 @@
assert:
that:
- mod not in sapi.value.modules_disabled
quite: "{% 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:
......
......@@ -11,6 +11,7 @@
assert:
that:
- sapi.value.state == "absent"
quite: "{% 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment