Skip to content

Commit

Permalink
Merge pull request #8 from f500/feature/fix-defaults-without-changing
Browse files Browse the repository at this point in the history
Don't remove default server if we're using it
  • Loading branch information
ramondelafuente authored Oct 11, 2017
2 parents edb9daf + ac0bc96 commit b6f7c67
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,20 @@
notify: Restart nginx

- name: Remove dist servers
file: "dest=/etc/nginx/{{ item[0] }}/{{ item[1] }} state=absent"
with_nested:
- [ conf.d, sites-available, sites-enabled ]
- [ default.conf, default ]
file: "dest=/etc/nginx/{{ item }} state=absent"
with_items:
- conf.d/default.conf
- conf.d/default
- sites-available/default
- sites-enabled/default
notify: Restart nginx

- name: Remove default server
file: "dest=/etc/nginx/{{ item }} state=absent"
with_items:
- sites-available/default.conf
- sites-enabled/default.conf
when: not nginx_set_default_server
notify: Restart nginx

- name: Write default server
Expand Down

0 comments on commit b6f7c67

Please sign in to comment.