From 667be909a02bebdbc84b736f1d187c0391f5918b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 5 Oct 2016 13:19:03 +0200 Subject: [PATCH] library/roles/nginx/tasks/nginx.yml: cache_update only if needed. --- nginx/tasks/nginx.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nginx/tasks/nginx.yml b/nginx/tasks/nginx.yml index d11dad86..25c6b103 100644 --- a/nginx/tasks/nginx.yml +++ b/nginx/tasks/nginx.yml @@ -1,20 +1,20 @@ --- - name: Install the Ubuntu PPA for nginx - apt_repository: repo='{{ nginx_ppa_repo }}' + apt_repository: repo='{{ nginx_ppa_repo }}' update_cache=yes when: - nginx_use_ppa - "'{{ ansible_distribution }}' == 'Ubuntu'" tags: [ 'nginx', 'nginx_ppa' ] - name: Install the nginx web server - apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes + apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800 with_items: - nginx-full when: not nginx_use_ldap_pam_auth tags: nginx - name: Install the nginx web server if we need ldap auth via pam - apt: pkg={{ item }} state=installed + apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800 with_items: - nginx-extras when: nginx_use_ldap_pam_auth