Skip to content

Commit 1cf74a5

Browse files
authored
Merge pull request #112 from pillarsdotnet/master
Make starting the nginx service optional.
2 parents a68ddd7 + 29a87f0 commit 1cf74a5

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ This role has multiple variables. The defaults for all these variables are the f
170170
# Default is true.
171171
nginx_enable: true
172172

173+
# Start NGINX service.
174+
# Default is true.
175+
nginx_start: true
176+
173177
# Print NGINX configuration file to terminal after executing playbook.
174178
nginx_debug_output: false
175179

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# Default is true.
44
nginx_enable: true
55

6+
# Start NGINX service.
7+
# Default is true
8+
nginx_start: true
9+
610
# Print NGINX configuration file to terminal after executing playbook.
711
nginx_debug_output: false
812

handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,36 @@
44
name: nginx
55
state: started
66
enabled: yes
7+
when: nginx_start
78

89
- name: "(Handler: All OSs) Reload NGINX"
910
service:
1011
name: nginx
1112
state: reloaded
13+
when: nginx_start
1214

1315
- name: "(Handler: All OSs) Start NGINX Amplify Agent"
1416
service:
1517
name: amplify-agent
1618
state: started
19+
when: nginx_start
1720

1821
- name: "(Handler: All OSs) Start NGINX Controller Agent"
1922
service:
2023
name: controller-agent
2124
state: started
25+
when: nginx_start
2226

2327
- name: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
2428
service:
2529
name: unit
2630
state: started
2731
enabled: yes
32+
when: nginx_start
2833

2934
- name: "(Handler: FreeBSD) Start NGINX Unit"
3035
service:
3136
name: unitd
3237
state: started
3338
enabled: yes
39+
when: nginx_start

0 commit comments

Comments
 (0)