summaryrefslogtreecommitdiff
path: root/ansible/roles/trove-setup/tasks/lighttpd.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/trove-setup/tasks/lighttpd.yml')
-rw-r--r--ansible/roles/trove-setup/tasks/lighttpd.yml29
1 files changed, 10 insertions, 19 deletions
diff --git a/ansible/roles/trove-setup/tasks/lighttpd.yml b/ansible/roles/trove-setup/tasks/lighttpd.yml
index 48b5773..091ed11 100644
--- a/ansible/roles/trove-setup/tasks/lighttpd.yml
+++ b/ansible/roles/trove-setup/tasks/lighttpd.yml
@@ -11,6 +11,7 @@
args:
creates: /etc/lighttpd/certs/lighttpd.pem
when: TROVE_SSL_PEMFILE is not defined
+ notify: Restart lighttpd-git service
- name: Copy certifiacte for lighttpd if provided
copy:
@@ -18,6 +19,7 @@
dest: /etc/lighttpd/certs/lighttpd.pem
mode: 0400
when: TROVE_SSL_PEMFILE is defined
+ notify: Restart lighttpd-git service
- name: Copy certifiacte for lighttpd if provided
copy:
@@ -25,6 +27,7 @@
dest: /etc/lighttpd/certs/ca-certs.pem
mode: 0400
when: TROVE_SSL_CA_FILE is defined
+ notify: Restart lighttpd-git service
- name: Create /var/run/lighttpd for cache user
file:
@@ -37,37 +40,25 @@
template:
src: lighttpd/git-httpd.conf
dest: /etc/lighttpd/git-httpd.conf
+ notify: Restart lighttpd-git service
# Now that the lighttpd certificates, configuration files and /var/run/lighttpd
-# exist, we can enable the lighttpd-git service
+# exist, we can enable and start lighttpd services
- name: Enable lighttpd-git service
service:
name: lighttpd-git.service
enabled: yes
- register: lighttpd_git_service
+ notify: Restart lighttpd-git service
-# Now we can start the service without rebooting the system
-- name: Restart the lighttpd-git service
- service:
- name: lighttpd-git
- state: restarted
- when: lighttpd_git_service|changed
-
-# Once the service lighttpd-git is running it's possible to do the same
-# with the following services:
-# - lighttpd-morph-cache
-# - lighttpd-lorry-controller-webapp
- name: Enable lighttpd-morph-cache service
service:
name: lighttpd-morph-cache.service
enabled: yes
- register: lighttpd_morph_cache_service
-- name: Restart the lighttpd-morph-cache service
- service:
- name: lighttpd-morph-cache
- state: restarted
- when: lighttpd_morph_cache_service|changed
+ notify: Restart lighttpd-morph-cache service
+# The service lighttpd-lorry-controller-webapp has to start here and
+# can't be done in a handler, given that the lorry-controller-minion
+# service will fail to start if this one is not running.
- name: Enable the lighttpd-lorry-controller-webapp service
service:
name: lighttpd-lorry-controller-webapp.service