Skip to content

Commit 20ad208

Browse files
committed
Follow-up to #7: Make PHP Pecl install command configurable.
1 parent 7fe73d5 commit 20ad208

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ PHP must already be installed on the server (along with the package `php-pear`),
1212

1313
Available variables are listed below, along with default values (see `defaults/main.yml`):
1414

15+
php_pecl_install_command: "pecl install"
16+
17+
The command that will be run to install extensions. The default is generally correct, but if you're running Ubuntu 14.04 LTS and run into [this issue](https://github.com/geerlingguy/ansible-role-php-pecl/pull/7), you should override this default with `"pecl install -Z"`
18+
1519
php_pecl_extensions: []
1620

1721
A list of extensions that should be installed via `pecl install`. If you'd like to have this role install extensions like XDebug, just add it in the list, like so:

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
php_pecl_install_command: "pecl install"
3+
24
# Add extensions to this list to have them installed with this role.
35
php_pecl_extensions: []
46
# - xdebug

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Install PECL libaries.
3-
shell: "yes \"\" | pecl install -Z {{ item }}"
3+
shell: "yes \"\" | {{ php_pecl_install_command }} {{ item }}"
44
register: pecl_result
55
changed_when: "pecl_result.rc == 0"
66
failed_when: "not (('already installed' in pecl_result.stdout) or ('install ok:' in pecl_result.stdout))"

0 commit comments

Comments
 (0)