From 3780da144546b69d6e76a24d6219f0d5a397886a Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 4 Apr 2018 14:01:58 -0500 Subject: [PATCH] Fix deprecation warnings in Ansible 2.5 for state 'present'. --- README.md | 2 +- defaults/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c9bbb8..a3659b7 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 (RedHat/CentOS only) If you have enabled any additional repositories (might I suggest [geerlingguy.repo-epel](https://github.com/geerlingguy/ansible-role-repo-epel) or [geerlingguy.repo-remi](https://github.com/geerlingguy/ansible-role-repo-remi)), those repositories can be listed under this variable (e.g. `remi-php70,epel`). This can be handy, as an example, if you want to install the latest version of PHP 7.0, which is in the Remi repository. - php_packages_state: "installed" + php_packages_state: "present" 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. diff --git a/defaults/main.yml b/defaults/main.yml index dc3a058..d73a6dc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,9 +3,9 @@ # for RHEL/CentOS. php_enablerepo: "" -# PHP package state; use 'installed' to make sure it's installed, or 'latest' if +# PHP package state; use 'present' to make sure it's installed, or 'latest' if # you want to upgrade or switch versions using a new repo. -php_packages_state: installed +php_packages_state: present # Whether to install recommended packages. Used only for Debian/Ubuntu. php_install_recommends: yes