Skip to content

Commit

Permalink
Merge pull request #787 from roots/add-php-extensions-variable
Browse files Browse the repository at this point in the history
Allow customization of PHP extensions
  • Loading branch information
swalkinshaw authored Mar 11, 2017
2 parents 8a6789a + d12ce57 commit 2773baa
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Allow customization of PHP extensions ([#787](https://github.com/roots/trellis/pull/787))
* Allow for per-project packagist.com authentication ([#762](https://github.com/roots/trellis/pull/762))
* Set multisite constants false while checking `wp core is-installed` ([#766](https://github.com/roots/trellis/pull/766))
* Forward extra bin/deploy.sh parameters to ansible-playbook ([#748](https://github.com/roots/trellis/pull/748))
Expand Down
2 changes: 1 addition & 1 deletion roles/common/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apt_packages_default:
- libnss-myhostname

apt_packages_custom: []
apt_packages_install: "{{ apt_packages_default + apt_packages_custom }}"
apt_packages: "{{ apt_packages_default + apt_packages_custom }}"

openssh_6_8_plus: "{{ (lookup('pipe', 'ssh -V 2>&1')) | regex_replace('(.*OpenSSH_([\\d\\.]*).*)', '\\2') | version_compare('6.8', '>=') }}"
overlapping_ciphers: "[{% for cipher in (sshd_ciphers_default + sshd_ciphers_extra) if cipher in ssh_client_ciphers %}'{{ cipher }}',{% endfor %}]"
Expand Down
2 changes: 1 addition & 1 deletion roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
state: present
update_cache: true
cache_valid_time: "{{ apt_cache_valid_time }}"
with_items: "{{ apt_packages_install }}"
with_items: "{{ apt_packages }}"

- name: Validate timezone variable
stat:
Expand Down
18 changes: 18 additions & 0 deletions roles/php/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
disable_default_pool: true
memcached_sessions: false

php_extensions_default:
- php7.1-cli
- php7.1-common
- php7.1-curl
- php7.1-dev
- php7.1-fpm
- php7.1-gd
- php7.1-mbstring
- php7.1-mcrypt
- php7.1-mysql
- php7.1-opcache
- php7.1-xml
- php7.1-xmlrpc
- php7.1-zip

php_extensions_custom: []
php_extensions: "{{ php_extensions_default + php_extensions_custom }}"

php_error_reporting: 'E_ALL & ~E_DEPRECATED & ~E_STRICT'
php_display_errors: 'Off'
php_display_startup_errors: 'Off'
Expand Down
15 changes: 1 addition & 14 deletions roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,7 @@
name: "{{ item }}"
state: present
force: yes
with_items:
- php7.1-cli
- php7.1-common
- php7.1-curl
- php7.1-dev
- php7.1-fpm
- php7.1-gd
- php7.1-mbstring
- php7.1-mcrypt
- php7.1-mysql
- php7.1-opcache
- php7.1-xml
- php7.1-xmlrpc
- php7.1-zip
with_items: "{{ php_extensions }}"

- name: Start php7.1-fpm service
service:
Expand Down

0 comments on commit 2773baa

Please sign in to comment.