ansible-role-nginx/tasks/plus/setup-debian.yml
Alessandro Fael Garcia add3bfba0b Replace get_url module
The get_url module has python 2.7 dependencies. This causes errors on distros that have strict python 2.6 dependencies. Replacing the get_url module with a hardcoded code block using the blockinfile module circumvents these errors.
2018-03-01 16:15:27 -08:00

21 lines
778 B
YAML

---
- name: "(Install: Debian/Ubuntu) Add NGINX Plus Repository"
apt_repository:
repo: deb https://plus-pkgs.nginx.com/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} nginx-plus
filename: nginx-plus
update_cache: no
- name: "(Install: Debian/Ubuntu) Verify NGINX Plus License"
blockinfile:
path: /etc/apt/apt.conf.d/90nginx
create: yes
block: |
Acquire::https::plus-pkgs.nginx.com::Verify-Peer "true";
Acquire::https::plus-pkgs.nginx.com::Verify-Host "true";
Acquire::https::plus-pkgs.nginx.com::SslCert "/etc/ssl/nginx/nginx-repo.crt";
Acquire::https::plus-pkgs.nginx.com::SslKey "/etc/ssl/nginx/nginx-repo.key";
- name: "(Install: Debian/Ubuntu) Update APT Cache"
apt:
update_cache: yes