Merge pull request #28 from nginxinc/(bug)/fix-stat

Fix stat path
This commit is contained in:
Alessandro Fael Garcia 2018-04-17 16:28:28 -07:00 committed by GitHub
commit c7cd4848e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,22 +1,22 @@
---
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
stat:
path: /etc/nginx/conf.d/default.conf
path: /etc/nginx/nginx.conf
when: main_template_enable
register: default_exists
register: main_exists
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
copy:
remote_src: yes
src: /etc/nginx/conf.d/default.conf
dest: /etc/nginx/conf.d/default.conf.bak
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
src: /etc/nginx/nginx.conf
dest: /etc/nginx/nginx.conf.bak
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
file:
path: /etc/nginx/conf.d/default.conf
state: absent
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
template: