From c5459496539edd1ab7c9a796520cb3c7d331f0c2 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 17 Apr 2018 15:21:07 -0700 Subject: [PATCH] Fix stat path Use the path for nginx.conf instead of default.conf --- tasks/conf/push-config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/conf/push-config.yml b/tasks/conf/push-config.yml index 9aeba47..e56c77f 100644 --- a/tasks/conf/push-config.yml +++ b/tasks/conf/push-config.yml @@ -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_push_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_push_enable + src: /etc/nginx/nginx.conf + dest: /etc/nginx/nginx.conf.bak + when: main_exists.stat.exists and main_exists.stat.isreg and main_push_enable - name: "(Setup: All NGINX) Delete NGINX Default Configuration File" file: - path: /etc/nginx/conf.d/default.conf + path: /etc/nginx/nginx.conf state: absent - when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_push_enable + when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_push_enable - name: "(Setup: All NGINX) Upload NGINX Main Configuration File" copy: