Fix playbook crash whith acme and multiple domain

pull/35/head
Emilien Mantel 2018-03-22 17:47:53 +01:00
parent fd21603a4d
commit 6719b415ab
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
- name: FILE | Create SSL directories - name: FILE | Create SSL directories
file: file:
path: "{{ nginx_ssl_dir + '/' + item.name }}" path: "{{ nginx_ssl_dir + '/' + item | nginx_site_name }}"
state: directory state: directory
with_items: "{{ nginx_ssl_pairs }}" with_items: "{{ nginx_ssl_pairs }}"
when: item.dest_key is not defined or item.dest_cert is not defined when: item.dest_key is not defined or item.dest_cert is not defined
@ -27,7 +27,7 @@
- name: COPY | Deploy SSL keys - name: COPY | Deploy SSL keys
copy: copy:
content: "{{ item.key }}" content: "{{ item.key }}"
dest: "{{ nginx_ssl_dir + '/' + item.name + '/' + item.name + '.key' if item.dest_key is not defined else item.dest_key }}" dest: "{{ nginx_ssl_dir + '/' + item | nginx_site_name + '/' + item | nginx_site_name + '.key' if item.dest_key is not defined else item.dest_key }}"
mode: 0640 mode: 0640
with_items: "{{ nginx_ssl_pairs }}" with_items: "{{ nginx_ssl_pairs }}"
when: item.key is defined when: item.key is defined
@ -37,7 +37,7 @@
- name: COPY | Deploy SSL certs - name: COPY | Deploy SSL certs
copy: copy:
content: "{{ item.cert }}" content: "{{ item.cert }}"
dest: "{{ nginx_ssl_dir + '/' + item.name + '/' + item.name + '.crt' if item.dest_cert is not defined else item.dest_cert }}" dest: "{{ nginx_ssl_dir + '/' + item | nginx_site_name + '/' + item | nginx_site_name + '.crt' if item.dest_cert is not defined else item.dest_cert }}"
mode: 0644 mode: 0644
with_items: "{{ nginx_ssl_pairs }}" with_items: "{{ nginx_ssl_pairs }}"
when: item.cert is defined when: item.cert is defined