diff --git a/CHANGELOG.md b/CHANGELOG.md index dcb3092..e0a9956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ This project try to follows [Semantic Versioning](http://semver.org/) since the For migration information, you can always have a look at https://liip-drifter.readthedocs.io/en/latest/migrations.html. +## Unreleased + +### Changed + +- PHP role: add the custom php-dev.ini for all PHP versions and all OS + ## [2.0.4] - 2019-07-08 ### Changed diff --git a/provisioning/roles/php-apache/tasks/php7.yml b/provisioning/roles/php-apache/tasks/php7.yml index 6518de0..62b13e2 100644 --- a/provisioning/roles/php-apache/tasks/php7.yml +++ b/provisioning/roles/php-apache/tasks/php7.yml @@ -6,12 +6,11 @@ notify: restart apache become: yes -#- name: Configure mod-php -# command: php5enmod {{ item }} -# with_items: -# - php-dev -# - xdebug -# notify: restart apache -# become: yes +- name: Configure mod-php + command: "{{ phpenmod }} {{ item }}" + with_items: + - php-dev + notify: restart apache + become: yes - meta: flush_handlers diff --git a/provisioning/roles/php/tasks/main.yml b/provisioning/roles/php/tasks/main.yml index 138f0ff..14ae700 100644 --- a/provisioning/roles/php/tasks/main.yml +++ b/provisioning/roles/php/tasks/main.yml @@ -40,8 +40,18 @@ become: yes when: database_type|default(false) == 'postgresql' -- include: not-debian-7.0.yml - when: not (php_version_installed is version_compare('7.0', '>=') and ansible_distribution == 'Debian') +- name: Place PHP configuration files in place. + template: src={{ item.src }} dest={{ item.dest }} owner=root group=root mode=644 + become: yes + with_items: + - { src: php.ini.j2, dest: "{{ etc_php_path }}/mods-available/php-dev.ini" } + +- name: Activate PHP configuration files + command: "{{phpenmod}} {{ item }}" + with_items: + - php-dev + - imagick + become: yes - name: set php alternative to the correct path alternatives: name=php path={{ alternatives_php_path }} diff --git a/provisioning/roles/php/tasks/not-debian-7.0.yml b/provisioning/roles/php/tasks/not-debian-7.0.yml deleted file mode 100644 index 93fb6c5..0000000 --- a/provisioning/roles/php/tasks/not-debian-7.0.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: Place PHP configuration files in place. - template: src={{ item.src }} dest={{ item.dest }} owner=root group=root mode=644 - become: yes - with_items: - - { src: php.ini.j2, dest: "{{ etc_php_path }}/mods-available/php-dev.ini" } - -- name: Activate PHP configuration files - command: "{{phpenmod}} {{ item }}" - with_items: - - php-dev - - imagick - become: yes