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
7d1b328c
Commit
7d1b328c
authored
2 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
Delete absent SAPI config files
parent
04c96863
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Pipeline
#20869
passed
2 years ago
Stage: lint
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/checks.yml
+1
-0
1 addition, 0 deletions
tasks/checks.yml
tasks/main.yml
+11
-0
11 additions, 0 deletions
tasks/main.yml
tasks/sapi_absent.yml
+30
-0
30 additions, 0 deletions
tasks/sapi_absent.yml
with
42 additions
and
0 deletions
tasks/checks.yml
+
1
−
0
View file @
7d1b328c
...
...
@@ -22,6 +22,7 @@
that
:
-
ansible_distribution_release is defined
-
ansible_distribution_release is regex("^stretch|buster|bullseye|bookworm|focal|bionic|jammy$")
fail_msg
:
"
The
Linux
distro
{{
ansible_distribution
}}
{{
ansible_distribution_release
}}
is
not
supported
by
this
role"
-
name
:
Generate an array of existing PHP versions
set_fact
:
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
11
−
0
View file @
7d1b328c
...
...
@@ -48,6 +48,16 @@
loop_control
:
loop_var
:
version
label
:
"
{{
version
}}"
when
:
( php_versions[version].packages_absent is defined ) and ( php_versions[version].packages_absent != [] )
-
name
:
PHP SAPIs absent
include_tasks
:
sapi_absent.yml
loop
:
"
{{
php_versions_proposed
}}"
loop_control
:
loop_var
:
version
label
:
"
{{
version
}}"
when
:
-
php_versions[version].sapis is defined
-
name
:
PHP versioned packages present
apt
:
...
...
@@ -57,6 +67,7 @@
loop_control
:
loop_var
:
version
label
:
"
{{
version
}}"
when
:
( php_versions[version].packages_present is defined ) and ( php_versions[version].packages_present != [] )
when
:
( php_versions_proposed is defined ) and ( php_versions_proposed != [] )
...
...
This diff is collapsed.
Click to expand it.
tasks/sapi_absent.yml
0 → 100644
+
30
−
0
View file @
7d1b328c
---
-
name
:
PHP SAPI absent
block
:
-
name
:
"
Debug
SAPI
absent
for
PHP
{{
version
}}"
debug
:
msg
:
"
path
to
delete
/etc/php/{{
version
}}/{{
sapi.key
}}"
verbosity
:
2
loop
:
"
{{
php_versions[version].sapis
|
dict2items
}}"
loop_control
:
loop_var
:
sapi
label
:
"
{{
sapi.key
}}"
when
:
( sapi.value.state is defined ) and ( sapi.value.state == "absent" )
-
name
:
Fail
fail
:
-
name
:
"
SAPI
absent
for
PHP
{{
version
}}"
file
:
path
:
"
/etc/php/{{
version
}}/{{
sapi.key
}}"
state
:
absent
loop
:
"
{{
php_versions[version].sapis
|
dict2items
}}"
loop_control
:
loop_var
:
sapi
label
:
"
{{
sapi.key
}}"
when
:
( sapi.value.state is defined ) and ( sapi.value.state == "absent" )
tags
:
-
php
...
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