File tree Expand file tree Collapse file tree 4 files changed +41
-8
lines changed Expand file tree Collapse file tree 4 files changed +41
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- # Start NGINX
3
2
- name : " (Handler: All OSs) Start NGINX"
4
3
service :
5
4
name : nginx
6
5
state : started
7
6
8
- # Reload NGINX
9
7
- name : " (Handler: All OSs) Reload NGINX"
10
8
service :
11
9
name : nginx
12
10
state : reloaded
13
11
14
- - name : " (Handler: All OSs ) Start NGINX Unit"
12
+ - name : " (Handler: Debian/Ubuntu/CentOS/RedHat ) Start NGINX Unit"
15
13
service :
16
- name : unit
14
+ name : unitd
15
+ state : started
16
+
17
+ - name : " (Handler: FreeBSD) Start NGINX Unit"
18
+ service :
19
+ name : unitd
17
20
state : started
Original file line number Diff line number Diff line change 1
1
---
2
- - name : " (Install: All OSs ) Install NGINX Unit Modules"
2
+ - name : " (Install: Debian/Ubuntu/CentOS/RedHat ) Install NGINX Unit Modules"
3
3
package :
4
4
name : " {{ item }}"
5
5
state : present
6
6
with_items : " {{ unit_modules }}"
7
- notify : " (Handler: All OSs) Start NGINX Unit"
7
+ when : ansible_os_family != "FreeBSD"
8
+ notify : " (Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
9
+
10
+ - name : " (Install: FreeBSD) Install NGINX Unit Modules"
11
+ portinstall :
12
+ name : " {{ item }}"
13
+ state : present
14
+ with_items : " {{ unit_modules }}"
15
+ when : ansible_os_family == "FreeBSD"
16
+ notify : " (Handler: FreeBSD) Start NGINX Unit"
Original file line number Diff line number Diff line change 5
5
- import_tasks : setup-redhat.yml
6
6
when : ansible_os_family == "RedHat"
7
7
8
- - name : " (Install: All OSs) Install NGINX Unit"
8
+ - import_tasks : setup-freebsd.yml
9
+ when : ansible_os_family == "FreeBSD"
10
+
11
+ - name : " (Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX Unit"
9
12
package :
10
13
name : unit
11
14
state : present
12
- notify : " (Handler: All OSs) Start NGINX Unit"
15
+ when : ansible_os_family != "FreeBSD"
16
+ notify : " (Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
17
+
18
+ - name : " (Install: FreeBSD) Install NGINX Unit"
19
+ portinstall :
20
+ name : unit
21
+ state : present
22
+ when : ansible_os_family == "FreeBSD"
23
+ notify : " (Handler: FreeBSD) Start NGINX Unit"
13
24
14
25
- import_tasks : install-modules.yml
15
26
when : unit_modules is defined and unit_modules
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : " (Install: FreeBSD) Fetch Ports"
3
+ command : portsnap fetch --interactive
4
+ args :
5
+ creates : /var/db/portsnap/INDEX
6
+
7
+ - name : " (Install: FreeBSD) Extract Ports"
8
+ command : portsnap extract
9
+ args :
10
+ creates : /usr/ports
You can’t perform that action at this time.
0 commit comments