forked from ISTI-ansible-roles/ansible-roles
library/roles/nginx/tasks/nginx.yml: cache_update only if needed.
This commit is contained in:
parent
7616578607
commit
667be909a0
|
@ -1,20 +1,20 @@
|
||||||
---
|
---
|
||||||
- name: Install the Ubuntu PPA for nginx
|
- name: Install the Ubuntu PPA for nginx
|
||||||
apt_repository: repo='{{ nginx_ppa_repo }}'
|
apt_repository: repo='{{ nginx_ppa_repo }}' update_cache=yes
|
||||||
when:
|
when:
|
||||||
- nginx_use_ppa
|
- nginx_use_ppa
|
||||||
- "'{{ ansible_distribution }}' == 'Ubuntu'"
|
- "'{{ ansible_distribution }}' == 'Ubuntu'"
|
||||||
tags: [ 'nginx', 'nginx_ppa' ]
|
tags: [ 'nginx', 'nginx_ppa' ]
|
||||||
|
|
||||||
- name: Install the nginx web server
|
- 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:
|
with_items:
|
||||||
- nginx-full
|
- nginx-full
|
||||||
when: not nginx_use_ldap_pam_auth
|
when: not nginx_use_ldap_pam_auth
|
||||||
tags: nginx
|
tags: nginx
|
||||||
|
|
||||||
- name: Install the nginx web server if we need ldap auth via pam
|
- 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:
|
with_items:
|
||||||
- nginx-extras
|
- nginx-extras
|
||||||
when: nginx_use_ldap_pam_auth
|
when: nginx_use_ldap_pam_auth
|
||||||
|
|
Loading…
Reference in New Issue