Remote files in conf.d
This commit is contained in:
parent
8f099c62f2
commit
dab721eb60
|
@ -32,7 +32,9 @@ nginx_conf_snippets:
|
||||||
nginx_conf_remote_snippets: []
|
nginx_conf_remote_snippets: []
|
||||||
# - url: 'https://example.org/git/template.conf.j2'
|
# - url: 'https://example.org/git/template.conf.j2'
|
||||||
# file: file.conf
|
# file: file.conf
|
||||||
|
nginx_conf_remote_global_conf: []
|
||||||
|
# - url: 'https://example.org/git/template.conf.j2'
|
||||||
|
# file: file
|
||||||
nginx_workers: 4
|
nginx_workers: 4
|
||||||
nginx_worker_connections: 1024
|
nginx_worker_connections: 1024
|
||||||
nginx_multi_accept: 'off'
|
nginx_multi_accept: 'off'
|
||||||
|
|
|
@ -40,6 +40,25 @@
|
||||||
loop: '{{ nginx_conf_remote_snippets }}'
|
loop: '{{ nginx_conf_remote_snippets }}'
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
|
|
||||||
|
- name: Download any remote global config templates
|
||||||
|
become: false
|
||||||
|
get_url:
|
||||||
|
url: '{{ item.url }}'
|
||||||
|
dest: '/var/tmp/{{ item.name }}'
|
||||||
|
loop: '{{ nginx_conf_remote_global_conf }}'
|
||||||
|
delegate_to: 'localhost'
|
||||||
|
|
||||||
|
- name: Install any remote snippet configuration file
|
||||||
|
template:
|
||||||
|
src: '/var/tmp/{{ item.name }}'
|
||||||
|
dest: '/etc/nginx/conf.d/{{ item.name }}.conf'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0444
|
||||||
|
loop: '{{ nginx_conf_remote_global_conf }}'
|
||||||
|
notify: Reload nginx
|
||||||
|
|
||||||
|
|
||||||
- name: Create the modules- directories
|
- name: Create the modules- directories
|
||||||
file:
|
file:
|
||||||
dest: '/etc/nginx/modules-{{ item }}'
|
dest: '/etc/nginx/modules-{{ item }}'
|
||||||
|
|
Loading…
Reference in New Issue