ansible-role-nginx/tasks/plus/install-debian.yml

27 lines
934 B
YAML
Raw Normal View History

2018-01-10 23:40:01 +01:00
---
2020-09-15 21:27:06 +02:00
- name: "(Debian/Ubuntu) Set up NGINX Plus license verification"
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";
state: "{{ nginx_license_status | default ('present') }}"
mode: 0444
2018-01-10 23:40:01 +01:00
2020-09-15 21:27:06 +02:00
- name: "(Debian/Ubuntu) Configure NGINX Plus repository"
apt_repository:
filename: nginx-plus
2020-09-15 21:27:06 +02:00
repo: "{{ repository }}"
2018-01-10 23:40:01 +01:00
update_cache: yes
state: "{{ nginx_license_status | default ('present') }}"
mode: 0644
2020-09-15 21:27:06 +02:00
- name: "(Debian/Ubuntu) Install NGINX Plus"
apt:
name: "nginx-plus{{ nginx_version | default('') }}"
state: "{{ nginx_state }}"
notify: "(Handler) Start NGINX"