Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of PHP extensions #787

Merged
merged 1 commit into from
Mar 11, 2017
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 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