Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart php-fpm if present #55

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,3 @@ roundcube_carddav_version: 4.4.2

# Installer
roundcube_enable_installer: false

# Apache
roundcube_apache: true
10 changes: 9 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@
ansible.builtin.service:
name: apache2
state: restarted
when: roundcube_apache | bool
listen: Restart webserver
when: ansible_facts.services is search("apache2.service")

- 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
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:
Loading