|
1 | 1 | ---
|
2 | 2 | - name: (FreeBSD) Update ports
|
| 3 | + when: |
| 4 | + - ansible_facts['system'] == "FreeBSD" |
| 5 | + - nginx_bsd_update_ports | bool |
3 | 6 | block:
|
4 | 7 | - name: (FreeBSD) Fetch ports
|
5 | 8 | ansible.builtin.command: portsnap fetch --interactive
|
|
10 | 13 | ansible.builtin.command: portsnap extract
|
11 | 14 | args:
|
12 | 15 | creates: /usr/ports
|
13 |
| - when: |
14 |
| - - ansible_facts['system'] == "FreeBSD" |
15 |
| - - nginx_bsd_update_ports | bool |
16 | 16 |
|
17 | 17 | - name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
|
| 18 | + when: ansible_facts['system'] == "FreeBSD" |
18 | 19 | block:
|
19 | 20 | - name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
|
20 | 21 | community.general.pkgng:
|
|
30 | 31 | state: "{{ nginx_state }}"
|
31 | 32 | when: not nginx_bsd_install_packages | bool
|
32 | 33 | notify: (Handler) Run NGINX
|
33 |
| - when: ansible_facts['system'] == "FreeBSD" |
34 | 34 |
|
35 | 35 | - name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
|
| 36 | + when: ansible_facts['system'] == "OpenBSD" |
36 | 37 | block:
|
37 | 38 | - name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX package
|
38 | 39 | community.general.openbsd_pkg:
|
|
49 | 50 | state: "{{ nginx_state }}"
|
50 | 51 | when: not nginx_bsd_install_packages | bool
|
51 | 52 | notify: (Handler) Run NGINX
|
52 |
| - when: ansible_facts['system'] == "OpenBSD" |
53 | 53 |
|
54 | 54 | - name: (NetBSD) {{ nginx_setup | capitalize }} NGINX
|
| 55 | + when: ansible_facts['system'] == "NetBSD" |
55 | 56 | block:
|
56 | 57 | - name: (NetBSD) {{ nginx_setup | capitalize }} NGINX package
|
57 | 58 | ansible.builtin.command: pkg_add www/nginx{{ nginx_version | default('') }}
|
|
62 | 63 | ansible.builtin.fail:
|
63 | 64 | msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
|
64 | 65 | when: not nginx_bsd_install_packages | bool
|
65 |
| - when: ansible_facts['system'] == "NetBSD" |
66 | 66 |
|
67 | 67 | - name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX
|
| 68 | + when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD'] |
68 | 69 | block:
|
69 | 70 | - name: (DragonFlyBSD/HardenedBSD) {{ nginx_setup | capitalize }} NGINX package
|
70 | 71 | ansible.builtin.command: pkg install www/nginx{{ nginx_version | default('') }}
|
|
75 | 76 | ansible.builtin.fail:
|
76 | 77 | msg: "{{ ansible_facts['system'] }} {{ nginx_setup | capitalize }} NGINX port not implemented."
|
77 | 78 | when: not nginx_bsd_install_packages | bool
|
78 |
| - when: ansible_facts['system'] in ['DragonFlyBSD', 'HardenedBSD'] |
0 commit comments