Skip to content

Commit

Permalink
Add generic webserver listener
Browse files Browse the repository at this point in the history
  • Loading branch information
t2d committed Aug 14, 2024
1 parent 9b64263 commit 1e31117
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
ansible.builtin.service:
name: apache2
state: restarted
listen: Restart webserver
when: ansible_facts.services is search("apache2.service")
notify:
- Restart php-fpm

- name: Restart php-fpm
ansible.builtin.service:
name: "{{ ansible_facts.services | select('search', '-fpm.service') | first }}"
state: restarted
listen: Restart webserver
when: ansible_facts.services is search("-fpm.service")
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
follow: False
mode: 0777
register: link
notify: Restart apache
notify: Restart webserver

- name: Link www to current roundcube release public_html directory
ansible.builtin.file:
Expand All @@ -100,7 +100,7 @@
follow: False
mode: 0777
register: link
notify: Restart apache
notify: Restart webserver

- name: Ensure roundcube and plugin configs are latest
ansible.builtin.template:
Expand Down

0 comments on commit 1e31117

Please sign in to comment.