roles/apache: Do not start Apache

If another role that depends on the *apache* role accidentally creates
an invalid configuration, it will be impossible to correct it by
subsequent invocations of its playbook. This is because the *apache*
role always tries to start the service, which will fail if the
configuration is invalid, thus aborting the playbook. With this early
abort, there is no way for later tasks to correct the error.

Playbooks that include the *apache* role should have a task that is
executed after all the roles have been applied to ensure the service is
running.
jenkins-master
Dustin 2018-07-29 09:25:54 -05:00
parent e8f9f48bfd
commit 9f5f692b6a
2 changed files with 1 additions and 6 deletions

View File

@ -3,3 +3,4 @@
*.key *.key
*.pem *.pem
*.keytab *.keytab
*.cnf

View File

@ -87,12 +87,6 @@
with_items: '{{ web_ports }}' with_items: '{{ web_ports }}'
notify: save firewalld configuration notify: save firewalld configuration
- meta: flush_handlers
- name: ensure httpd service is running
service:
name=httpd
state=started
- name: ensure old apache logs are rotated - name: ensure old apache logs are rotated
template: template:
src=httpd.logrotate.j2 src=httpd.logrotate.j2