2019-11-18 21:09:10 +01:00
|
|
|
---
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: FreeBSD) Update Ports"
|
2019-11-18 21:09:10 +01:00
|
|
|
block:
|
|
|
|
- name: "(Install: FreeBSD) Fetch Ports"
|
|
|
|
command: portsnap fetch --interactive
|
|
|
|
args:
|
|
|
|
creates: /var/db/portsnap/INDEX
|
|
|
|
|
|
|
|
- name: "(Install: FreeBSD) Extract Ports"
|
|
|
|
command: portsnap extract
|
|
|
|
args:
|
|
|
|
creates: /usr/ports
|
|
|
|
when:
|
2020-07-28 12:26:38 +02:00
|
|
|
- ansible_system == "FreeBSD"
|
2020-08-19 18:39:17 +02:00
|
|
|
- nginx_bsd_update_ports | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
|
|
|
|
- name: "(Install: FreeBSD)"
|
|
|
|
block:
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: FreeBSD) Install NGINX Package"
|
2019-11-18 21:09:10 +01:00
|
|
|
pkgng:
|
|
|
|
name: "www/nginx{{ nginx_version | default('') }}"
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: FreeBSD) Install NGINX Port"
|
2019-11-18 21:09:10 +01:00
|
|
|
portinstall:
|
|
|
|
name: "www/nginx{{ nginx_version | default('') }}"
|
|
|
|
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: not nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
2020-07-28 12:26:38 +02:00
|
|
|
when: ansible_system == "FreeBSD"
|
2019-11-18 21:09:10 +01:00
|
|
|
|
|
|
|
- name: "(Install: OpenBSD)"
|
|
|
|
block:
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: OpenBSD) Install NGINX Package"
|
2019-11-18 21:09:10 +01:00
|
|
|
openbsd_pkg:
|
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
2020-07-30 12:47:08 +02:00
|
|
|
build: no
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: OpenBSD) Install NGINX Port"
|
2019-11-18 21:09:10 +01:00
|
|
|
openbsd_pkg:
|
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
2020-07-30 12:47:08 +02:00
|
|
|
build: yes
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: not nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
2020-07-28 12:26:38 +02:00
|
|
|
when: ansible_system == "OpenBSD"
|
2019-11-18 21:09:10 +01:00
|
|
|
|
|
|
|
- name: "(Install: NetBSD)"
|
|
|
|
block:
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: NetBSD) Install NGINX Package"
|
2019-11-18 21:09:10 +01:00
|
|
|
command: "pkg_add www/nginx{{ nginx_version | default('') }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: NetBSD) Install NGINX Port"
|
2019-11-18 21:09:10 +01:00
|
|
|
fail:
|
|
|
|
msg: "{{ ansible_system }} Install NGINX port not implemented."
|
2020-08-19 18:39:17 +02:00
|
|
|
when: not nginx_bsd_install_packages | bool
|
2020-07-28 12:26:38 +02:00
|
|
|
when: ansible_system == "NetBSD"
|
2019-11-18 21:09:10 +01:00
|
|
|
|
|
|
|
- name: "(Install: DragonFlyBSD)"
|
|
|
|
block:
|
2020-07-28 12:26:38 +02:00
|
|
|
- name: "(Install: DragonFlyBSD) Install NGINX Package"
|
2019-11-18 21:09:10 +01:00
|
|
|
command: "pkg install www/nginx{{ nginx_version | default('') }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
|
|
|
- name: "(Install: DragonFlyBSD) Install NGINX port"
|
|
|
|
fail:
|
|
|
|
msg: "{{ ansible_system }} Install NGINX port not implemented."
|
2020-08-19 18:39:17 +02:00
|
|
|
when: not nginx_bsd_install_packages | bool
|
2020-07-28 12:26:38 +02:00
|
|
|
when: ansible_system == "DragonFlyBSD"
|
2019-11-18 21:09:10 +01:00
|
|
|
|
|
|
|
- name: "(Install: HardenedBSD)"
|
|
|
|
block:
|
|
|
|
- name: "(Install: HardenedBSD) Install NGINX package"
|
|
|
|
command: "pkg install www/nginx{{ nginx_version | default('') }}"
|
2020-08-19 18:39:17 +02:00
|
|
|
when: nginx_bsd_install_packages | bool
|
2019-11-18 21:09:10 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|
|
|
|
|
|
|
|
- name: "(Install: HardenedBSD) Install NGINX port"
|
|
|
|
fail:
|
|
|
|
msg: "{{ ansible_system }} Install NGINX port not implemented."
|
2020-08-19 18:39:17 +02:00
|
|
|
when: not nginx_bsd_install_packages | bool
|
2020-07-28 12:26:38 +02:00
|
|
|
when: ansible_system == "HardenedBSD"
|