diff --git a/provisioning/ansible/config/beetbox.config.yml b/provisioning/ansible/config/beetbox.config.yml index 465ce3f..a857898 100644 --- a/provisioning/ansible/config/beetbox.config.yml +++ b/provisioning/ansible/config/beetbox.config.yml @@ -272,6 +272,7 @@ php_extension_conf_paths: - "/etc/php/{{ php_version }}/cli/conf.d" php_fpm_daemon: "php{{ php_version }}-fpm" php_fpm_conf_path: "/etc/php/{{ php_version }}/fpm" +php_fpm_pool_conf_path: "/etc/php/{{ php_version }}/fpm/pool.d/www.conf" php_mysql_package: "php{{ php_version }}-mysql" php_memcached_package: "php-memcache" php55_packages: diff --git a/provisioning/ansible/roles/beetbox-common/meta/main.yml b/provisioning/ansible/roles/beetbox-common/meta/main.yml index cb69d20..ec5da8e 100644 --- a/provisioning/ansible/roles/beetbox-common/meta/main.yml +++ b/provisioning/ansible/roles/beetbox-common/meta/main.yml @@ -7,6 +7,7 @@ dependencies: - { role: geerlingguy.nginx } - { role: geerlingguy.mysql } - { role: beetbox-php-ppa } + - { role: beetbox-php-7.0, when: "{{ php_version }} == '7.0'" } - { role: geerlingguy.php } - { role: geerlingguy.php-pecl } - { role: geerlingguy.php-mysql } diff --git a/provisioning/ansible/roles/beetbox-php-7.0/tasks/main.yml b/provisioning/ansible/roles/beetbox-php-7.0/tasks/main.yml new file mode 100644 index 0000000..faa6c12 --- /dev/null +++ b/provisioning/ansible/roles/beetbox-php-7.0/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Set default PHP7 fpm daemon. + set_fact: + php_fpm_daemon: php7.0-fpm + +- name: Set xhprof_download_url for PHP7. + set_fact: + xhprof_download_url: https://github.com/RustJason/xhprof/archive/php7.zip + when: "{{ xhprof_download_url }} == 'https://github.com/phacility/xhprof/archive/master.tar.gz'" + +- name: Set xhprof_download_folder_name for PHP7. + set_fact: + xhprof_download_folder_name: xhprof-php7 + when: "{{ xhprof_download_folder_name }} == 'master'" diff --git a/provisioning/ansible/roles/beetbox-php-ppa/tasks/main.yml b/provisioning/ansible/roles/beetbox-php-ppa/tasks/main.yml index 972310c..09b4833 100644 --- a/provisioning/ansible/roles/beetbox-php-ppa/tasks/main.yml +++ b/provisioning/ansible/roles/beetbox-php-ppa/tasks/main.yml @@ -15,16 +15,6 @@ - "{{ php55_packages }} + {{ php56_packages }} + {{ php70_packages }}" register: php_purge -- name: Purge depreciated memcached package. - apt: - name: "{{ item }}" - state: absent - purge: yes - force: yes - when: php_purge.changed - with_items: - - "php-memcached" - - name: Purge PHP modules directory. file: path: "{{ item }}" @@ -37,41 +27,14 @@ - name: Set PHP 5.5 packages. set_fact: php_packages: "{{ php55_packages }}" - when: php_version == '5.5' + when: "'{{ php_version }}' == '5.5'" - name: Set PHP 5.6 packages. set_fact: php_packages: "{{ php56_packages }}" - when: php_version == '5.6' + when: "'{{ php_version }}' == '5.6'" - name: Set PHP 7.0 packages. set_fact: php_packages: "{{ php70_packages }}" - when: php_version == '7.0' - -# PHP 7 Support - -- name: Set default PHP7 mysql package. - set_fact: - php_mysql_package: php7.0-mysql - when: (php_version == '7.0') and (php_mysql_package is not defined) - -- name: Set default PHP7 fpm daemon. - set_fact: - php_fpm_daemon: php7.0-fpm - when: (php_version == '7.0') and (php_fpm_daemon is not defined) - -- name: Set default PHP7 fpm pool conf path. - set_fact: - php_fpm_pool_conf_path: "/etc/php/7.0/fpm/pool.d/www.conf" - when: (php_version == '7.0') and (php_fpm_pool_conf_path is not defined) - -- name: Set xhprof_download_url for PHP7. - set_fact: - xhprof_download_url: https://github.com/RustJason/xhprof/archive/php7.zip - when: php_version == '7.0' - -- name: Set xhprof_download_folder_name for PHP7. - set_fact: - xhprof_download_folder_name: xhprof-php7 - when: php_version == '7.0' + when: "'{{ php_version }}' == '7.0'"