Skip to content

Commit aa4fcd3

Browse files
committed
Update in README.md
1 parent 87db5ea commit aa4fcd3

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,73 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role to a
306306
- role: nginxinc.nginx
307307
```
308308

309+
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing the open source version of NGINX as a simple web server.
310+
311+
```yaml
312+
---
313+
- hosts: localhost
314+
become: true
315+
roles:
316+
- nginxinc.nginx
317+
vars:
318+
nginx_http_template_enable: true
319+
nginx_http_template:
320+
web_server:
321+
locations:
322+
default:
323+
location: /
324+
html_file_location: /usr/share/nginx/html
325+
html_file_name: index.html
326+
327+
```
328+
329+
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing the open source version of NGINX as a reverse proxy.
330+
331+
```yaml
332+
---
333+
- hosts: localhost
334+
become: true
335+
roles:
336+
- nginxinc.nginx
337+
vars:
338+
nginx_http_template_enable: true
339+
nginx_http_template:
340+
load_balancer:
341+
locations:
342+
frontend:
343+
location: /
344+
proxy_pass: frontend_servers
345+
backend:
346+
location: /backend
347+
proxy_pass: backend_servers
348+
upstreams:
349+
upstream_1:
350+
name: frontend_servers
351+
lb_method: least_conn
352+
zone_name: frontend
353+
zone_size: 64k
354+
sticky_cookie: false
355+
servers:
356+
frontend_server_1:
357+
address: localhost
358+
port: 80
359+
weight: 1
360+
health_check: max_fails=3 fail_timeout=5s
361+
upstream_2:
362+
name: backend_servers
363+
lb_method: least_conn
364+
zone_name: backend
365+
zone_size: 64k
366+
sticky_cookie: false
367+
servers:
368+
backend_server_1:
369+
address: localhost
370+
port: 8080
371+
weight: 1
372+
health_check: max_fails=3 fail_timeout=5s
373+
```
374+
375+
309376
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing NGINX Plus.
310377

311378
```yaml

0 commit comments

Comments
 (0)