Add feature: new custom instructions
parent
05cb864c7c
commit
e0bb5e2752
|
@ -45,6 +45,7 @@ Socket:
|
|||
- `nginx_pid`: daemon pid file
|
||||
- `nginx_events_*`: all variables in events 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
|
||||
|
||||
|
|
|
@ -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_disable: '"msie6"'
|
||||
|
||||
#
|
||||
# nginx_http_custom
|
||||
#
|
||||
nginx_http_custom: []
|
||||
|
||||
#
|
||||
# Vhosts
|
||||
#
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
with_fileglob: '../templates/etc/nginx/helper/*.j2'
|
||||
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
|
||||
include: upstream.yml
|
||||
when: nginx_php
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
{% for i in nginx_custom_http %}
|
||||
{{ i }}
|
||||
{% endfor %}
|
|
@ -28,6 +28,8 @@
|
|||
description: 'Please login!'
|
||||
users: []
|
||||
state: 'absent'
|
||||
nginx_custom_http:
|
||||
- 'add_header X-ansible 1;'
|
||||
nginx_vhosts:
|
||||
- name:
|
||||
- 'test.local'
|
||||
|
|
Loading…
Reference in New Issue