ansible-role-nginx/tasks/plus/install-freebsd.yml
Alessandro Fael Garcia 903693e67f
Refactor handlers (#321)
2020-09-17 17:00:27 +02:00

29 lines
826 B
YAML

---
- name: "(FreeBSD) Set up NGINX Plus license verification"
blockinfile:
path: /usr/local/etc/pkg.conf
block: |
PKG_ENV: { SSL_NO_VERIFY_PEER: "1",
SSL_CLIENT_CERT_FILE: "/etc/ssl/nginx/nginx-repo.crt",
SSL_CLIENT_KEY_FILE: "/etc/ssl/nginx/nginx-repo.key" }
state: "{{ nginx_license_status | default ('present') }}"
- name: "(FreeBSD) Configure NGINX Plus repository"
blockinfile:
path: /etc/pkg/nginx-plus.conf
create: yes
block: |
nginx-plus: {
URL: {{ repository }}
ENABLED: yes
MIRROR_TYPE: SRV
}
state: "{{ nginx_license_status | default ('present') }}"
mode: 0644
- name: "(FreeBSD) Install NGINX Plus"
pkgng:
name: "nginx-plus{{ nginx_version | default('') }}"
state: "{{ nginx_state }}"
notify: "(Handler) Run NGINX"