2015-05-28 11:32:57 +02:00
|
|
|
---
|
2016-06-29 17:13:42 +02:00
|
|
|
- name: Install the Ubuntu PPA for nginx
|
2016-10-05 13:19:03 +02:00
|
|
|
apt_repository: repo='{{ nginx_ppa_repo }}' update_cache=yes
|
2016-06-29 17:15:36 +02:00
|
|
|
when:
|
|
|
|
- nginx_use_ppa
|
2016-06-29 17:29:57 +02:00
|
|
|
- "'{{ ansible_distribution }}' == 'Ubuntu'"
|
2016-06-29 17:13:42 +02:00
|
|
|
tags: [ 'nginx', 'nginx_ppa' ]
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: Install the nginx web server
|
2016-10-05 13:19:03 +02:00
|
|
|
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
|
2015-05-28 11:32:57 +02:00
|
|
|
with_items:
|
|
|
|
- nginx-full
|
2018-02-16 18:06:11 +01:00
|
|
|
when:
|
|
|
|
- not nginx_use_ldap_pam_auth
|
|
|
|
- ansible_distribution_major_version <= '14'
|
2015-08-05 19:14:03 +02:00
|
|
|
tags: nginx
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the nginx web server if we need ldap auth via pam
|
2016-10-05 13:19:03 +02:00
|
|
|
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
|
2015-08-05 19:14:03 +02:00
|
|
|
with_items:
|
2015-05-28 11:32:57 +02:00
|
|
|
- nginx-extras
|
2018-02-16 18:06:11 +01:00
|
|
|
when:
|
|
|
|
- nginx_use_ldap_pam_auth
|
|
|
|
- ansible_distribution_major_version <= '14'
|
2015-08-05 19:14:03 +02:00
|
|
|
tags: nginx
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-16 18:06:11 +01:00
|
|
|
- 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
|
|
|
|
when: ansible_distribution_major_version >= '16'
|
|
|
|
tags: nginx
|