From 21ed97ad5137567f056478bdea65bdead3448e9f Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 9 May 2018 20:52:06 -0500 Subject: [PATCH] Fixes #14: PHP version 5.6 installs PHP 7.2 on Ubuntu. --- README.md | 4 ++++ defaults/main.yml | 3 +++ tasks/main.yml | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 14cd1ea..0f5f0fe 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ Available variables are listed below, along with default values (see `defaults/m The PHP version to be installed. Any [currently-supported PHP major version](http://php.net/supported-versions.php) is a valid option (e.g. `5.6`, `7.0`, `7.1`, etc. + php_versions_install_recommends: no + +(For Debian OSes only) Whether to install recommended packages. This is set to `no` by default because setting it to `yes` often leads to multiple PHP versions being installed (thus making a bit of a mess) when using repos like Ondrej's PHP PPA for Ubuntu. + ## Dependencies - geerlingguy.php is a soft dependency as the `php_version` variable is required to be set. diff --git a/defaults/main.yml b/defaults/main.yml index ea9b337..4a8113d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,6 @@ --- # The PHP version to be installed. php_version: '7.1' + +# For Debian OSes only. +php_versions_install_recommends: no diff --git a/tasks/main.yml b/tasks/main.yml index 53c3831..65fc3d4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,6 +26,10 @@ php_xhprof_module_path: __php_xhprof_module_path php_packages: __php_packages +- name: Define php_install_recommends variable. + set_fact: + php_install_recommends: "{{ php_versions_install_recommends }}" + # Setup tasks. - include_tasks: "setup-{{ ansible_os_family }}.yml"