mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Many minor changes
This commit is contained in:
@@ -12,7 +12,10 @@
|
||||
changed_when: false
|
||||
|
||||
- name: TEMPLATE | Deploy nginx.conf
|
||||
template: src=etc/nginx/nginx.conf.j2 dest=/etc/nginx/nginx.conf validate= "nginx -t"
|
||||
template: >
|
||||
src=etc/nginx/nginx.conf.j2
|
||||
dest=/etc/nginx/nginx.conf
|
||||
validate= "nginx -t"
|
||||
notify: reload nginx
|
||||
|
||||
- name: FILE | Create /etc/nginx/helpers
|
||||
@@ -27,7 +30,10 @@
|
||||
# creates: "{{ nginx_dh_path }}"
|
||||
|
||||
- name: TEMPLATE | Deploy all helpers
|
||||
template: src={{ item }} dest=/etc/nginx/helpers/{{ item | basename | regex_replace('\.j2$','') }}
|
||||
template: >
|
||||
src={{ item }}
|
||||
dest=/etc/nginx/helpers/{{ item | basename | regex_replace('\.j2$','') }}
|
||||
validate= "nginx -t"
|
||||
with_fileglob: '../templates/etc/nginx/helpers/*.j2'
|
||||
notify: reload nginx
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
template: >
|
||||
src=etc/nginx/sites-available/{{ item.template }}.j2
|
||||
dest=/etc/nginx/sites-available/{{ item.name if item.name is string else item.name[0] }}
|
||||
validate='nginx -t'
|
||||
with_items: nginx_vhosts
|
||||
notify: reload nginx
|
||||
when: item.delete is not defined or not item.delete
|
||||
|
||||
Reference in New Issue
Block a user