Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Added role for PHP 7 specific config. #231

Merged
merged 1 commit into from
Jun 15, 2016
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
1 change: 1 addition & 0 deletions provisioning/ansible/config/beetbox.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions provisioning/ansible/roles/beetbox-common/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
14 changes: 14 additions & 0 deletions provisioning/ansible/roles/beetbox-php-7.0/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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'"
43 changes: 3 additions & 40 deletions provisioning/ansible/roles/beetbox-php-ppa/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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'"