Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream #1

Merged
merged 12 commits into from
Jan 18, 2020
Prev Previous commit
Next Next commit
Add task to remove default.conf from sites-enabled/ (jdauphant#231)
* 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
commit a6aa5ed94a05ba84ec48a1e20bf203eafcbffe5a
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