You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+96-25Lines changed: 96 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Use `ansible-galaxy install nginxinc.nginx` to install the role on your system.
17
17
18
18
It supports all platforms supported by [NGINX Open Source](https://nginx.org/en/linux_packages.html#mainline) and [NGINX Plus](https://www.nginx.com/products/technical-specs/):
19
19
20
-
**NGINX Open Source:**
20
+
**NGINX Open Source**
21
21
22
22
```yaml
23
23
CentOS:
@@ -47,7 +47,7 @@ FreeBSD:
47
47
- 11
48
48
```
49
49
50
-
**NGINX Plus:**
50
+
**NGINX Plus**
51
51
52
52
```yaml
53
53
CentOS:
@@ -84,7 +84,52 @@ FreeBSD:
84
84
- 11
85
85
```
86
86
87
-
**NGINX Unit:**
87
+
**NGINX Amplify**
88
+
89
+
```yaml
90
+
CentOS:
91
+
versions:
92
+
- 6
93
+
- 7
94
+
RedHat:
95
+
versions:
96
+
- 6
97
+
- 7
98
+
Debian:
99
+
versions:
100
+
- jessie
101
+
- stretch
102
+
Ubuntu:
103
+
versions:
104
+
- trusty
105
+
- xenial
106
+
- artful
107
+
- bionic
108
+
Amazon Linux:
109
+
versions:
110
+
- 2017.09
111
+
```
112
+
113
+
**NGINX Controller**
114
+
115
+
```yaml
116
+
CentOS:
117
+
versions:
118
+
- 7
119
+
RedHat:
120
+
versions:
121
+
- 7
122
+
Debian:
123
+
versions:
124
+
- jessie
125
+
- stretch
126
+
Ubuntu:
127
+
versions:
128
+
- xenial
129
+
- artful
130
+
```
131
+
132
+
**NGINX Unit**
88
133
89
134
```yaml
90
135
CentOS:
@@ -154,6 +199,16 @@ nginx_repository:
154
199
# Default is mainline.
155
200
branch: mainline
156
201
202
+
# Location of your NGINX Plus license in your local machine.
203
+
# Default is the files folder within the NGINX Ansible role.
204
+
license:
205
+
certificate: license/nginx-repo.crt
206
+
key: license/nginx-repo.key
207
+
208
+
# Delete NGINX Plus license after installation for security purposes.
209
+
# Default is true.
210
+
delete_license: true
211
+
157
212
# Install NGINX JavaScript, Perl, ModSecurity WAF (NGINX Plus only), GeoIP, Image-Filter, RTMP Media Streaming, and/or XSLT modules.
158
213
# Default is false.
159
214
modules:
@@ -167,31 +222,37 @@ modules:
167
222
168
223
# Install NGINX Amplify.
169
224
# Use your NGINX Amplify API key.
225
+
# Requires access to either the NGINX stub status or the NGINX Plus REST API.
170
226
# Default is null.
171
227
amplify_enable: false
172
228
amplify_key: null
173
229
230
+
# Install NGINX Controller.
231
+
# Use your NGINX Controller API key and NGINX Controller API endpoint.
232
+
# Requires NGINX Plus and write access to the NGINX Plus REST API.
233
+
# Default is null.
234
+
controller_enable: false
235
+
controller_api_key: null
236
+
controller_api_endpoint: null
237
+
238
+
# Install NGINX Unit and NGINX Unit modules.
239
+
# Use a list of supported NGINX Unit modules.
240
+
# Default is false.
241
+
unit_enable: false
242
+
unit_modules: null
243
+
174
244
# Enable NGINX status data.
175
245
# Will enable 'stub_status' in NGINX Open Source and 'status' in NGINX Plus.
176
246
# Default is false.
177
247
status_enable: false
178
248
179
249
# Enable NGINX Plus REST API, write access to the REST API, and NGINX Plus dashboard.
250
+
# Requires NGINX Plus.
180
251
# Default is false.
181
252
rest_api_enable: false
182
253
rest_api_write: false
183
254
rest_api_dashboard: false
184
255
185
-
# Location of your NGINX Plus license in your local machine.
186
-
# Default is the files folder within the NGINX Ansible role.
187
-
license:
188
-
certificate: license/nginx-repo.crt
189
-
key: license/nginx-repo.key
190
-
191
-
# Delete NGINX Plus license after installation for security purposes.
192
-
# Default is true.
193
-
delete_license: true
194
-
195
256
# Enable uploading NGINX configuration files to your system.
196
257
# Default for uploading files is false.
197
258
# Default location of files is the files folder within the NGINX Ansible role.
@@ -215,12 +276,6 @@ http_template_listen: 80
215
276
http_template_server_name: localhost
216
277
stream_template_enable: false
217
278
stream_template_listen: 12345
218
-
219
-
# Install NGINX Unit and NGINX Unit modules.
220
-
# Use a list of supported NGINX Unit modules.
221
-
# Default is false.
222
-
unit_enable: false
223
-
unit_modules: null
224
279
```
225
280
226
281
Dependencies
@@ -241,6 +296,16 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a
241
296
- role: nginxinc.nginx
242
297
```
243
298
299
+
This is a sample playbook file for deploying the Ansible Galaxy NGINX role to a dynamic inventory containing the `nginx` tag.
300
+
301
+
```yaml
302
+
---
303
+
- hosts: tag_nginx
304
+
remote_user: root
305
+
roles:
306
+
- role: nginxinc.nginx
307
+
```
308
+
244
309
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing NGINX Plus.
245
310
246
311
```yaml
@@ -253,19 +318,25 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a
253
318
type: plus
254
319
```
255
320
256
-
This is a sample playbook file for deploying the Ansible Galaxy NGINX role to a dynamic inventory containing the `nginx` tag.
321
+
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost to install NGINX Plus and the NGINX Controller agent.
257
322
258
-
```yml
259
-
---
260
-
- hosts: tag_nginx
261
-
remote_user: root
323
+
```yaml
324
+
- hosts: localhost
325
+
become: true
262
326
roles:
263
327
- role: nginxinc.nginx
328
+
vars:
329
+
type: plus
330
+
rest_api_enable: true
331
+
rest_api_write: true
332
+
controller_enable: true
333
+
controller_api_key: <API_KEY_HERE>
334
+
controller_api_endpoint: https://<FQDN>/1.4
264
335
```
265
336
266
337
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost to install NGINX Unit and the PHP/Perl NGINX Unit language modules.
0 commit comments