Skip to content

Commit

Permalink
Restart php-fpm if present
Browse files Browse the repository at this point in the history
  • Loading branch information
t2d committed Aug 9, 2024
1 parent 6f58e7c commit a4aa505
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@
name: apache2
state: restarted
when: roundcube_apache | bool
notify:
- Restart php-fpm

- name: Restart php-fpm
ansible.builtin.service:
name: "{{ ansible_facts.services | select('search', '-fpm.service') | first }}"
state: restarted
when: ansible_facts.services is search("-fpm.service")
3 changes: 3 additions & 0 deletions tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
- roundcube_des_key is defined and roundcube_des_key != ""
fail_msg: "roundcube_mysql_password and roundcube_des_key must be set"
success_msg: "roundcube_mysql_password and roundcube_des_key are set"

- name: Populate service facts
ansible.builtin.service_facts:

0 comments on commit a4aa505

Please sign in to comment.