diff --git a/README.md b/README.md index d505a73..ad49ecb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The default values for the HTTP server deamon are `httpd` (used by Apache) for R If you have enabled any additional repositories such as [geerlingguy.repo-epel](https://github.com/geerlingguy/ansible-role-repo-epel) or [geerlingguy.repo-remi](https://github.com/geerlingguy/ansible-role-repo-remi), you may want an easy way to swap PHP versions on the fly. By default, this is set to 'installed'. You can now override this variable to 'latest'. Combined with php_enablerepo, a user now doesn't need to manually uninstall the existing PHP packages before installing them from a different repository. - php_install_recommends: '' + php_install_recommends: yes (Debian/Ubuntu only) Whether to install recommended packages when installing `php_packages`; you might want to set this to `no` explicitly if you're installing a PPA that recommends certain packages you don't want (e.g. Ondrej's `php` PPA will install `php7.0-cli` if you install `php-pear` alongside `php5.6-cli`... which is often not desired!). diff --git a/defaults/main.yml b/defaults/main.yml index 6e6be80..e06ca3c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,7 +8,7 @@ php_enablerepo: "" php_packages_state: installed # Whether to install recommended packages. Used only for Debian/Ubuntu. -php_install_recommends: '' +php_install_recommends: yes # Set this to false if you're not using PHP with Apache/Nginx/etc. php_enable_webserver: true diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 26b096a..3b3d6d3 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -6,7 +6,7 @@ apt: name: "{{ item }}" state: "{{ php_packages_state }}" - install_recommends: "{{ php_install_recommends | default(omit) }}" + install_recommends: "{{ php_install_recommends }}" with_items: "{{ php_packages }}" register: php_package_install notify: restart webserver