Fix the apt tasks.

This commit is contained in:
Andrea Dell'Amico 2019-03-23 11:24:24 +01:00
parent ee585a6ac4
commit 7c19e0a3c7
1 changed files with 3 additions and 9 deletions

View File

@ -7,26 +7,20 @@
tags: [ 'nginx', 'nginx_ppa' ]
- name: Install the nginx web server
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
with_items:
- nginx-full
apt: pkg=nginx-full state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
when:
- not nginx_use_ldap_pam_auth
- ansible_distribution_major_version <= '14'
tags: nginx
- name: Install the nginx web server if we need ldap auth via pam
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
with_items:
- nginx-extras
apt: pkg=nginx-extras state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
when:
- nginx_use_ldap_pam_auth
- ansible_distribution_major_version <= '14'
tags: nginx
- name: Install the nginx web server on Ubuntu >= 16.04
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
with_items:
- nginx
apt: pkg=nginx state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
when: ansible_distribution_major_version >= '16'
tags: nginx