|
@ -81,14 +81,15 @@ |
|
|
src: site.j2 |
|
|
src: site.j2 |
|
|
dest: "/etc/nginx/sites-available/{{ item.server.file_name }}" |
|
|
dest: "/etc/nginx/sites-available/{{ item.server.file_name }}" |
|
|
with_items: "{{ nginx_sites }}" |
|
|
with_items: "{{ nginx_sites }}" |
|
|
|
|
|
|
|
|
|
|
|
when: nginx_sites is defined and nginx_sites |
|
|
|
|
|
|
|
|
- name: enable nginx configurations used for letsencrypt challenge |
|
|
- name: enable nginx configurations used for letsencrypt challenge |
|
|
file: |
|
|
file: |
|
|
path: "/etc/nginx/sites-enabled/{{ item.server.file_name }}" |
|
|
path: "/etc/nginx/sites-enabled/{{ item.server.file_name }}" |
|
|
state: link |
|
|
state: link |
|
|
src: "/etc/nginx/sites-enabled/{{ item.server.file_name }}" |
|
|
src: "/etc/nginx/sites-enabled/{{ item.server.file_name }}" |
|
|
with_items: "{{ nginx_sites }}" |
|
|
with_items: "{{ nginx_sites }}" |
|
|
when: letsencrypt|bool and item.use_for_challenge is defined and item.use_for_challenge|bool |
|
|
|
|
|
|
|
|
when: letsencrypt|bool and item.use_for_challenge is defined and item.use_for_challenge|bool and nginx_sites is defined and nginx_sites |
|
|
|
|
|
|
|
|
- name: restart nginx to start enabled configurations used for letsencrypt |
|
|
- name: restart nginx to start enabled configurations used for letsencrypt |
|
|
service: |
|
|
service: |
|
@ -104,7 +105,7 @@ |
|
|
- name: provision ssl cert/key(s) with letsencrypt |
|
|
- name: provision ssl cert/key(s) with letsencrypt |
|
|
include: letsencrypt.yml |
|
|
include: letsencrypt.yml |
|
|
with_items: "{{ nginx_sites }}" |
|
|
with_items: "{{ nginx_sites }}" |
|
|
when: letsencrypt|bool and item.letsencrypt is defined |
|
|
|
|
|
|
|
|
when: letsencrypt|bool and item.letsencrypt is defined and nginx_sites is defined and nginx_sites |
|
|
|
|
|
|
|
|
- name: enable nginx configuration generated from standard template |
|
|
- name: enable nginx configuration generated from standard template |
|
|
file: |
|
|
file: |
|
|