|
|
@ -12,7 +12,7 @@ |
|
|
|
-out {{ item.letsencrypt.ssl_csr | default(item.server.ssl_certificate~".csr") }} |
|
|
|
-subj "/C={{ item.letsencrypt.ssl_country | default(letsencrypt_ssl_country) |
|
|
|
}}/ST={{ item.letsencrypt.ssl_state | default(letsencrypt_ssl_state) |
|
|
|
}}/L{{ item.letsencrypt.ssl_loc | default(letsencrypt_ssl_loc) |
|
|
|
}}/L={{ item.letsencrypt.ssl_loc | default(letsencrypt_ssl_loc) |
|
|
|
}}/O={{ item.letsencrypt.ssl_org | default(letsencrypt_ssl_org) |
|
|
|
}}/CN={{ item.letsencrypt.ssl_cn | default(item.server.server_name) |
|
|
|
}}/emailAddress={{ item.letsencrypt.ssl_email | default(letsencrypt_ssl_email) }}" |
|
|
@ -43,3 +43,13 @@ |
|
|
|
acme_directory: "{{ letsencrypt_acme_dir | default(omit) }}" |
|
|
|
data: "{{ letsencrypt_challenge }}" |
|
|
|
notify: restart nginx |
|
|
|
|
|
|
|
- name: download intermediate cert for chaining |
|
|
|
get_url: |
|
|
|
url: "{{ letsencrypt_intermediate_url }}" |
|
|
|
dest: "{{ letsencrypt_intermediate_crt }}" |
|
|
|
when: letsencrypt_challenge|changed |
|
|
|
|
|
|
|
- name: chaining intermediate certificate |
|
|
|
shell: "cat {{ letsencrypt_intermediate_crt }} >> {{ item.server.ssl_certificate }}" |
|
|
|
when: letsencrypt_challenge|changed |