Skip to content
Snippets Groups Projects
Commit 9a9898f8 authored by jurgenhaas's avatar jurgenhaas
Browse files

Restart Apache (if present) from role PHP when needed

parent 3cbfdaf2
No related branches found
No related tags found
No related merge requests found
php_called_from_apache: false
php_needs_oci8: false php_needs_oci8: false
php_conf_dir: 'conf.d' php_conf_dir: 'conf.d'
php_allow_call_time_pass_reference: 'on' php_allow_call_time_pass_reference: 'on'
......
---
# file: roles/php/handlers/php.yml
- name: "PHP | Restart Apache"
debug: msg="Need to restart Apache server"
when: php_called_from_apache
changed_when: php_called_from_apache
notify:
- "Apache | Restart Apache"
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
- php5-xdebug - php5-xdebug
- php5-dev - php5-dev
- php-pear - php-pear
notify:
- "PHP | Restart Apache"
# TODO: Upgrade APCu on Ubuntu 14.04 # TODO: Upgrade APCu on Ubuntu 14.04
# @see https://github.com/owncloud/core/issues/14175#issuecomment-74573088 # @see https://github.com/owncloud/core/issues/14175#issuecomment-74573088
...@@ -31,6 +33,8 @@ ...@@ -31,6 +33,8 @@
owner=root owner=root
group=root group=root
mode=0644 mode=0644
notify:
- "PHP | Restart Apache"
- name: "PHP | Cache configuration file, apc.ini" - name: "PHP | Cache configuration file, apc.ini"
template: template:
...@@ -39,6 +43,8 @@ ...@@ -39,6 +43,8 @@
owner=root owner=root
group=root group=root
mode=0644 mode=0644
notify:
- "PHP | Restart Apache"
- name: "PHP | Create extra directory for browscap" - name: "PHP | Create extra directory for browscap"
file: file:
...@@ -55,6 +61,8 @@ ...@@ -55,6 +61,8 @@
owner=root owner=root
group=root group=root
when: php_browscap when: php_browscap
notify:
- "PHP | Restart Apache"
- name: "PHP | Enable PHP modules" - name: "PHP | Enable PHP modules"
shell: php5enmod {{ item }} shell: php5enmod {{ item }}
...@@ -62,6 +70,8 @@ ...@@ -62,6 +70,8 @@
- mcrypt - mcrypt
- imap - imap
when: php_conf_dir == 'mods-available' when: php_conf_dir == 'mods-available'
notify:
- "PHP | Restart Apache"
- name: "PHP | Create htdocs directory for apc status" - name: "PHP | Create htdocs directory for apc status"
file: file:
...@@ -83,6 +93,8 @@ ...@@ -83,6 +93,8 @@
when: php_needs_oci8 when: php_needs_oci8
ignore_errors: yes ignore_errors: yes
changed_when: oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so' changed_when: oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so'
notify:
- "PHP | Restart Apache"
- include: oci.yml - include: oci.yml
when: repository is defined and php_needs_oci8 and oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so' when: repository is defined and php_needs_oci8 and oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment