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 bfa015e
Show file tree
Hide file tree
Showing 2 changed files with 14 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: "{{ __roundcube_php_fpm.files[0] }}"
state: restarted
when: __roundcube_php_fpm and __roundcube_php_fpm.matched > 0
6 changes: 6 additions & 0 deletions tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
- 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: "Determine if php-fpm is installed"
ansible.builtin.find:
path: "/usr/sbin/"
patterns: "php-fpm*"
register: __roundcube_php_fpm

0 comments on commit bfa015e

Please sign in to comment.