Add feature: new custom instructions
parent
05cb864c7c
commit
e0bb5e2752
|
@ -45,6 +45,7 @@ Socket:
|
||||||
- `nginx_pid`: daemon pid file
|
- `nginx_pid`: daemon pid file
|
||||||
- `nginx_events_*`: all variables in events block
|
- `nginx_events_*`: all variables in events block
|
||||||
- `nginx_http_*`: all variables in http block
|
- `nginx_http_*`: all variables in http block
|
||||||
|
- `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`)
|
||||||
|
|
||||||
### Vhost management
|
### Vhost management
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,11 @@ nginx_http_gzip_types: 'text/plain text/css application/json application/x-javas
|
||||||
nginx_http_gzip_vary: 'on'
|
nginx_http_gzip_vary: 'on'
|
||||||
nginx_http_gzip_disable: '"msie6"'
|
nginx_http_gzip_disable: '"msie6"'
|
||||||
|
|
||||||
|
#
|
||||||
|
# nginx_http_custom
|
||||||
|
#
|
||||||
|
nginx_http_custom: []
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vhosts
|
# Vhosts
|
||||||
#
|
#
|
||||||
|
|
|
@ -36,6 +36,12 @@
|
||||||
with_fileglob: '../templates/etc/nginx/helper/*.j2'
|
with_fileglob: '../templates/etc/nginx/helper/*.j2'
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
||||||
|
- name: TEMPLATE | Deploy custom http configuration
|
||||||
|
template: >
|
||||||
|
src=etc/nginx/conf.d/custom.conf.j2
|
||||||
|
dest=/etc/nginx/conf.d/custom.conf
|
||||||
|
notify: reload nginx
|
||||||
|
|
||||||
- name: INCLUDE | Upstream configuration
|
- name: INCLUDE | Upstream configuration
|
||||||
include: upstream.yml
|
include: upstream.yml
|
||||||
when: nginx_php
|
when: nginx_php
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
#
|
||||||
|
|
||||||
|
{% for i in nginx_custom_http %}
|
||||||
|
{{ i }}
|
||||||
|
{% endfor %}
|
|
@ -28,6 +28,8 @@
|
||||||
description: 'Please login!'
|
description: 'Please login!'
|
||||||
users: []
|
users: []
|
||||||
state: 'absent'
|
state: 'absent'
|
||||||
|
nginx_custom_http:
|
||||||
|
- 'add_header X-ansible 1;'
|
||||||
nginx_vhosts:
|
nginx_vhosts:
|
||||||
- name:
|
- name:
|
||||||
- 'test.local'
|
- 'test.local'
|
||||||
|
|
Loading…
Reference in New Issue