Browse Source

disable broken server configuration files

necessary to avoid nginx startup failure
nginx-letsencrypt
Lorenzo 8 years ago
parent
commit
6d332231c6
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      roles/nginx/tasks/main.yaml

+ 10
- 0
roles/nginx/tasks/main.yaml View File

@ -88,7 +88,17 @@
dest: "/etc/nginx/sites-available/{{ item.server.file_name }}"
with_items: "{{ nginx_sites }}"
when: nginx_sites is defined and nginx_sites
register: nginx_gen_conf
notify: restart nginx
- name: disable ssl configurations with pending cert issuing
file:
path: "/etc/nginx/sites-enabled/{{ item.item.server.file_name }}"
state: absent
with_items: "{{ nginx_gen_conf.results }}"
when:
- item | changed
- item.item.letsencrypt is defined
- name: enable nginx configurations used for letsencrypt challenge
file:


Loading…
Cancel
Save