various update
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
---
|
||||
- name: "nginx | copy status vhost"
|
||||
copy:
|
||||
src: "status.conf"
|
||||
dest: "/etc/nginx/sites-available/00-status.conf"
|
||||
- name: 'nginx | copy status vhost'
|
||||
template:
|
||||
src: status.conf.j2
|
||||
dest: /etc/nginx/sites-available/00-status.conf
|
||||
owner: root
|
||||
mode: "0644"
|
||||
force: yes
|
||||
backup: yes
|
||||
when: is_nginx
|
||||
notify:
|
||||
- 'nginx restart'
|
||||
tags:
|
||||
- nginx
|
||||
- nginx_configure
|
||||
|
||||
- name: "nginx | activate the status vhost"
|
||||
file:
|
||||
src: "/etc/nginx/sites-available/00-status.conf"
|
||||
dest: "/etc/nginx/sites-enabled/00-status.conf"
|
||||
state: link
|
||||
notify:
|
||||
- 'nginx restart'
|
||||
@@ -52,18 +52,16 @@
|
||||
|
||||
- name: 'nginx | configure nginx logs'
|
||||
file:
|
||||
path: "/var/log/nginx/{{ item.value.servername }}"
|
||||
path: "/var/log/nginx/{{ item.value.log_path }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: adm
|
||||
loop: "{{ nginx_vhosts | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.value.servername | default([]) }}"
|
||||
label: "{{ item.value.log_path | default([]) }}"
|
||||
when:
|
||||
- nginx_vhosts is defined
|
||||
- item.value.enabled is undefined or item.value.enabled
|
||||
- item.value.documentroot is defined
|
||||
- item.value.documentroot != False
|
||||
- item.value.log_path is undefined or item.value.log_path
|
||||
notify:
|
||||
- nginx reload
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user