Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
apache
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
apache
Commits
3b554129
Commit
3b554129
authored
6 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
apache2ctl configtest conditional on changes
parent
6699b47f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/main.yml
+20
-18
20 additions, 18 deletions
tasks/main.yml
with
20 additions
and
18 deletions
tasks/main.yml
+
20
−
18
View file @
3b554129
...
...
@@ -41,23 +41,25 @@
args
:
creates
:
/etc/apache2/sites-enabled/localhost.conf
-
name
:
Apache configtest
command
:
apache2ctl configtest
register
:
apache2ctl_configtest
when
:
apache_packages.changed or apache_modules.changed or apache_ssl.changed or apache_localhost.changed
-
debug
:
msg
:
"
{{
apache2ctl_configtest.stdout
}}"
verbosity
:
1
-
block
:
-
name
:
Apache restarted
service
:
name
:
apache2
state
:
restarted
when
:
'
"Syntax
OK"
in
apache2ctl_configtest.stdout'
-
name
:
Fail if Apache configtest is not OK
fail
:
msg
:
"
{{
apache2ctl_configtest.stdout
}}"
when
:
'
"Syntax
OK"
not
in
apache2ctl_configtest.stdout'
-
name
:
Apache configtest
command
:
apache2ctl configtest
register
:
apache2ctl_configtest
-
debug
:
msg
:
"
{{
apache2ctl_configtest.stdout
}}"
verbosity
:
1
-
name
:
Apache restarted
service
:
name
:
apache2
state
:
restarted
when
:
'
"Syntax
OK"
in
apache2ctl_configtest.stdout'
-
name
:
Fail if Apache configtest is not OK
fail
:
msg
:
"
{{
apache2ctl_configtest.stdout
}}"
when
:
'
"Syntax
OK"
not
in
apache2ctl_configtest.stdout'
when
:
apache_packages.changed or apache_modules.changed or apache_ssl.changed or apache_localhost.changed
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