From 79eafb32e3cd06c5bbb9d64919fef9eb021ffd4d Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 6 Jan 2017 18:31:58 +0100 Subject: [PATCH] Adds variable additional_php_packages (#165) * Allows to add additional_php_packages Allows to add additional_php_packages as var. Extends php_packages to install. * Adds description for variable additional_php_packages Adds description of new variable for additional php packages. --- README.md | 4 ++++ tasks/main.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 8574588..d198c5b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ A list of the PHP packages to install (OS-specific by default). You'll likely wa _Note: If you're using Debian/Ubuntu, you also need to install `libapache2-mod-fastcgi` (for cgi/PHP-FPM) or `libapache2-mod-php7.0` (or a similar package depending on PHP version) if you want to use `mod_php` with Apache._ + additional_php_packages: [] + +A list of additional PHP packages to install without overriding the default. + php_enable_webserver: true If your usage of PHP is tied to a web server (e.g. Apache or Nginx), leave this default value. If you are using PHP server-side or to run some small application, set this value to `false` so this role doesn't attempt to interact with a web server. diff --git a/tasks/main.yml b/tasks/main.yml index c6306cc..b1062ee 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,6 +8,11 @@ php_packages: "{{ __php_packages | list }}" when: php_packages is not defined +- name: Define additional php_packages. + set_fact: + php_packages: "{{ php_packages | list + additional_php_packages | list }}" + when: additional_php_packages is defined + - name: Define php_webserver_daemon. set_fact: php_webserver_daemon: "{{ __php_webserver_daemon }}"