Merge pull request #25 from nginxinc/(bug)/check-file-exists
Check if configuration file is defined
This commit is contained in:
commit
dab0e5d16f
@ -10,13 +10,13 @@
|
|||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: /etc/nginx/conf.d/default.conf
|
src: /etc/nginx/conf.d/default.conf
|
||||||
dest: /etc/nginx/conf.d/default.conf.bak
|
dest: /etc/nginx/conf.d/default.conf.bak
|
||||||
when: default_exists.stat.exists and main_push_enable
|
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_push_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
||||||
file:
|
file:
|
||||||
path: /etc/nginx/conf.d/default.conf
|
path: /etc/nginx/conf.d/default.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: default_exists.stat.exists and main_push_enable
|
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_push_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
|
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
|
||||||
copy:
|
copy:
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: /etc/nginx/conf.d/default.conf
|
src: /etc/nginx/conf.d/default.conf
|
||||||
dest: /etc/nginx/conf.d/default.conf.bak
|
dest: /etc/nginx/conf.d/default.conf.bak
|
||||||
when: default_exists.stat.exists and main_template_enable
|
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
||||||
file:
|
file:
|
||||||
path: /etc/nginx/conf.d/default.conf
|
path: /etc/nginx/conf.d/default.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: default_exists.stat.exists and main_template_enable
|
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
||||||
template:
|
template:
|
||||||
|
Loading…
Reference in New Issue
Block a user