Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
php
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
webarch
php
Commits
83c2ba68
Commit
83c2ba68
authored
2 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
make assert run in quite mode when not -v
parent
1a220589
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Merge Sury
Pipeline
#20920
passed
2 years ago
Stage: lint
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tasks/pkg_checks.yml
+1
-0
1 addition, 0 deletions
tasks/pkg_checks.yml
tasks/pool_check.yml
+7
-0
7 additions, 0 deletions
tasks/pool_check.yml
tasks/sapi_module_checks.yml
+1
-0
1 addition, 0 deletions
tasks/sapi_module_checks.yml
tasks/sapi_state_checks.yml
+1
-0
1 addition, 0 deletions
tasks/sapi_state_checks.yml
with
10 additions
and
0 deletions
tasks/pkg_checks.yml
+
1
−
0
View file @
83c2ba68
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
tasks/pool_check.yml
+
7
−
0
View file @
83c2ba68
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
tasks/sapi_module_checks.yml
+
1
−
0
View file @
83c2ba68
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
tasks/sapi_state_checks.yml
+
1
−
0
View file @
83c2ba68
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment