diff --git a/defaults/main.yml b/defaults/main.yml index 925e9b1bba4efd286d5039123e8c9abb96cd3a67..80d1b6769e9a749d5d3773ccc156db793fdd79d6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,4 @@ +php_called_from_apache: false php_needs_oci8: false php_conf_dir: 'conf.d' php_allow_call_time_pass_reference: 'on' diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..37c5633fd172a2ca29ca26902872b1e04ccf51a3 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,9 @@ +--- +# 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" diff --git a/tasks/php.yml b/tasks/php.yml index 06a6b639591fbf274ab620cef060a7adea595b88..987201f45063a39106afb42160f85c8eb886a4db 100644 --- a/tasks/php.yml +++ b/tasks/php.yml @@ -18,6 +18,8 @@ - php5-xdebug - php5-dev - php-pear + notify: + - "PHP | Restart Apache" # TODO: Upgrade APCu on Ubuntu 14.04 # @see https://github.com/owncloud/core/issues/14175#issuecomment-74573088 @@ -31,6 +33,8 @@ owner=root group=root mode=0644 + notify: + - "PHP | Restart Apache" - name: "PHP | Cache configuration file, apc.ini" template: @@ -39,6 +43,8 @@ owner=root group=root mode=0644 + notify: + - "PHP | Restart Apache" - name: "PHP | Create extra directory for browscap" file: @@ -55,6 +61,8 @@ owner=root group=root when: php_browscap + notify: + - "PHP | Restart Apache" - name: "PHP | Enable PHP modules" shell: php5enmod {{ item }} @@ -62,6 +70,8 @@ - mcrypt - imap when: php_conf_dir == 'mods-available' + notify: + - "PHP | Restart Apache" - name: "PHP | Create htdocs directory for apc status" file: @@ -83,6 +93,8 @@ when: php_needs_oci8 ignore_errors: yes changed_when: oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so' + notify: + - "PHP | Restart Apache" - include: oci.yml when: repository is defined and php_needs_oci8 and oci_available.stdout != '/usr/lib/php5/20090626/pdo_oci.so'