2017-08-29 06:51:06 +00:00
|
|
|
---
|
|
|
|
- name: Add nginx apt repository key for Debian < 8
|
|
|
|
apt_key:
|
|
|
|
url: http://nginx.org/keys/nginx_signing.key
|
|
|
|
state: present
|
2019-12-04 13:10:07 +00:00
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_version is version_compare('8', 'lt')
|
2017-08-29 06:51:06 +00:00
|
|
|
|
|
|
|
- name: Add nginx apt repository for Debian < 8
|
|
|
|
apt_repository:
|
|
|
|
repo: 'deb [arch=amd64,i386] http://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx'
|
|
|
|
state: present
|
2019-12-04 13:10:07 +00:00
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_version is version_compare('8', 'lt')
|
|
|
|
|
2017-08-29 06:51:06 +00:00
|
|
|
- name: Ensure nginx is installed.
|
|
|
|
apt:
|
|
|
|
pkg: nginx
|
|
|
|
state: installed
|
|
|
|
default_release: "{{ nginx_default_release }}"
|