Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webservices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
ansible-shared
webservices
Commits
fdd852e7
Commit
fdd852e7
authored
5 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
php-fpm: Create users and reliably parse systemctl output
parent
857f0b59
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
php-fpm/tasks/main.yml
+19
-1
19 additions, 1 deletion
php-fpm/tasks/main.yml
with
19 additions
and
1 deletion
php-fpm/tasks/main.yml
+
19
−
1
View file @
fdd852e7
...
...
@@ -20,6 +20,24 @@
notify
:
-
restart php-fpm
-
name
:
create groups
group
:
name
:
"
{{
item.name
}}"
system
:
true
state
:
present
with_items
:
"
{{
fpm_pools|default([])
}}"
-
name
:
create groups
user
:
name
:
"
{{
item.name
}}"
group
:
"
{{
item.name
}}"
system
:
true
home
:
"
/var/www/{{
item.name
}}"
shell
:
/usr/bin/nologin
createhome
:
false
state
:
present
with_items
:
"
{{
fpm_pools|default([])
}}"
-
name
:
ensure we have all the pools we want
template
:
src
:
pool.conf.j2
...
...
@@ -57,7 +75,7 @@
# yamllint disable rule:line-length
shell
:
|
set -o pipefail
systemctl
list-units
--state=loaded
| grep
php-fpm@ |
grep -v .socket | sed -E 's/.*php-fpm@(.*)\.service.*/\1/'
systemctl
show
--state=loaded
--type=service --property=Id --value
php-fpm@
\*
|
cut -d@ -f2 | cut -d. -f1
args
:
executable
:
/bin/bash
# yamllint enable rule:line-length
...
...
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