From 375c240a2bf3dc2bfc11d537cbf4146af55c19b1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 2 Feb 2017 15:04:39 +0100 Subject: [PATCH] library/roles/apache: Install the latest version by default. --- apache/defaults/main.yml | 1 + apache/tasks/apache.yml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apache/defaults/main.yml b/apache/defaults/main.yml index 4b405ec..805a8b9 100644 --- a/apache/defaults/main.yml +++ b/apache/defaults/main.yml @@ -1,6 +1,7 @@ --- apache_service_enabled: True apache_user: www-data +apache_pkg_state: latest apache_group: '{{ apache_user }}' apache_from_ppa: False apache_ppa_repo: 'ppa:ondrej/apache2' diff --git a/apache/tasks/apache.yml b/apache/tasks/apache.yml index adaaab7..915a3fe 100644 --- a/apache/tasks/apache.yml +++ b/apache/tasks/apache.yml @@ -1,11 +1,11 @@ --- - name: Install the apache packages - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state={{ apache_pkg_state }} update_cache=yes cache_valid_time=3600 with_items: '{{ apache_packages }}' tags: [ 'apache', 'apache_main_packages' ] - name: Install the apache modules packages - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state={{ apache_pkg_state }} update_cache=yes cache_valid_time=3600 with_items: '{{ apache_modules_packages }}' when: not apache_from_ppa tags: [ 'apache', 'apache_additional_packages' ] @@ -26,7 +26,7 @@ # tags: [ 'apache', 'apache_modules' ] - name: Install the apache additional packages, if any - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state={{ apache_pkg_state }} update_cache=yes cache_valid_time=3600 with_items: '{{ apache_additional_packages_list }}' when: apache_additional_packages tags: [ 'apache', 'apache_additional_packages' ]