ansible-role-nginx/tasks/plus/install-plus-bsd.yml
Vladimir Botka 31beec2e7b NGINX Plus separate installation of Linux and FreeBSD (#193)
* Added variable nginx_plus_linux_families: ['Alpine', 'Debian', 'RedHat', 'Suse']
* Added variable nginx_plus_bsd_systems: ['FreeBSD']
* Added variable nginx_freebsd_extra_packages: ['security/ca_root_nss']
* Installation of Linux moved to install-plus-linux.yml
* Installation of FreeBSD moved to install-plus-bsd.yml
* Installation of nginx_freebsd_extra_packages moved to tasks/prerequisites/setup-freebsd.yml
* Installation of NGINX Plus tested with FreeBSD 12.0; Lint passed
2019-11-26 14:15:55 +01:00

31 lines
928 B
YAML

---
- name: "(Install: FreeBSD)"
block:
- name: "(Install: FreeBSD) Add NGINX Plus Repository"
blockinfile:
path: /etc/pkg/nginx-plus.conf
create: yes
block: |
nginx-plus: {
URL: pkg+https://plus-pkgs.nginx.com/freebsd/${ABI}/latest
ENABLED: yes
MIRROR_TYPE: SRV
}
- name: "(Install: FreeBSD) Verify NGINX Plus License"
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" }
- name: "(Install: FreeBSD) Install nginx-plus{{ nginx_version | default('') }}"
pkgng:
name: "nginx-plus{{ nginx_version | default('') }}"
state: present
notify: "(Handler: All OSs) Start NGINX"
when: ansible_system == "FreeBSD"