35 lines
1.6 KiB
YAML
35 lines
1.6 KiB
YAML
---
|
|
- name: Ensure APT official nginx key
|
|
apt_key: url=http://nginx.org/keys/nginx_signing.key
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: Ensure APT official nginx repository
|
|
apt_repository: repo="deb http://nginx.org/packages/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} nginx"
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_os_family == 'Debian' and not nginx_official_repo_mainline
|
|
|
|
- name: Ensure APT official nginx repository (mainline)
|
|
apt_repository: repo="deb http://nginx.org/packages/mainline/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} nginx"
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_os_family == 'Debian' and nginx_official_repo_mainline
|
|
|
|
- name: Ensure RPM official nginx key
|
|
rpm_key: key=http://nginx.org/keys/nginx_signing.key
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- name: Ensure YUM official nginx repository
|
|
template: src=nginx.repo.j2 dest=/etc/yum.repos.d/nginx.repo
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
- name: Ensure zypper official nginx repository
|
|
zypper_repository: repo="http://nginx.org/packages/sles/12" name="nginx" disable_gpg_check=yes
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_distribution == 'SLES' and ansible_distribution_version == '12' and not nginx_official_repo_mainline
|
|
|
|
- name: Ensure zypper official nginx repository (mainline)
|
|
zypper_repository: repo="http://nginx.org/packages/mainline/sles/12" name="nginx" disable_gpg_check=yes
|
|
environment: "{{ nginx_env }}"
|
|
when: ansible_distribution == 'SLES' and ansible_distribution_version == '12' and nginx_official_repo_mainline
|