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

Commit

Permalink
Added role for PHP 7 specific config.
Browse files Browse the repository at this point in the history
  • Loading branch information
thom8 committed Jun 15, 2016
1 parent d795df9 commit dbcf699
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 41 deletions.
2 changes: 1 addition & 1 deletion provisioning/ansible/config/beetbox.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ php_extension_conf_paths:
- "/etc/php/{{ php_version }}/fpm/conf.d"
- "/etc/php/{{ php_version }}/apache2/conf.d"
- "/etc/php/{{ php_version }}/cli/conf.d"
php_fpm_daemon: "php{{ php_version }}-fpm"
php_fpm_daemon: "php5.6-fpm"
php_fpm_conf_path: "/etc/php/{{ php_version }}/fpm"
php_mysql_package: "php{{ php_version }}-mysql"
php_memcached_package: "php-memcache"
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
15 changes: 15 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,15 @@
---
- name:
set_fact:
php_fpm_daemon: php7.0-fpm
when: "{{ php_fpm_daemon }} == 'php5-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'"

0 comments on commit dbcf699

Please sign in to comment.