summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2016-08-28 23:22:24 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2016-08-30 20:23:11 +0200
commitd56611eb4f0d0363a426e69790ebfc95bb3d2f7e (patch)
tree19111394a4ffd5d36b521e9c3fc7acc7fae406ff
parentnginx: Add snippet with less paranoiac SSL settings (diff)
downloadansible-roles-d56611eb4f0d0363a426e69790ebfc95bb3d2f7e.tar.xz
nginx: Do not deploy default config automatically
-rw-r--r--roles/nginx/tasks/main.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml
index 122c5b8..4202394 100644
--- a/roles/nginx/tasks/main.yml
+++ b/roles/nginx/tasks/main.yml
@@ -61,6 +61,7 @@
stat:
path: /etc/nginx/sites-enabled/default
register: stat_default
+ when: default is defined
- name: Delete nginx default page
file:
@@ -68,7 +69,7 @@
state: absent
notify:
- restart nginx
- when: stat_default.stat.islnk == True
+ when: default is defined and stat_default.stat.islnk == True
- name: Deploy temporary default page (with our snippets etc)
copy:
@@ -80,6 +81,7 @@
owner: root
group: root
mode: 0644
+ when: default is defined
notify:
- restart nginx