Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Add task to remove default.conf from sites-enabled/ (#231)
Browse files Browse the repository at this point in the history
* Add task to remove `default.conf` from sites-enabled/

* Check if `default` site is not inside user config
  • Loading branch information
neslinesli93 authored and jdauphant committed Oct 12, 2018
1 parent bdb4556 commit a6aa5ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/remove-defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
notify:
- reload nginx

- name: Disable the default site (on newer nginx versions)
file:
path: "{{nginx_conf_dir}}/sites-enabled/default.conf"
state: absent
notify:
- reload nginx
when: >
'default' not in nginx_sites.keys()
- name: Remove the default configuration
file:
path: "{{nginx_conf_dir}}/conf.d/default.conf"
Expand Down

0 comments on commit a6aa5ed

Please sign in to comment.