|
@@ -23,7 +23,7 @@ |
|
|
delegate_to: "{{ certificate_authority_host }}" |
|
|
delegate_to: "{{ certificate_authority_host }}" |
|
|
|
|
|
|
|
|
- name: sign certificate with ca |
|
|
- name: sign certificate with ca |
|
|
command: openssl ca -selfsign -batch -notext |
|
|
|
|
|
|
|
|
command: openssl ca -batch -notext |
|
|
-config cnf/ca.cnf |
|
|
-config cnf/ca.cnf |
|
|
-in csr/{{inventory_hostname}}-{{certificate_name}}.csr.pem |
|
|
-in csr/{{inventory_hostname}}-{{certificate_name}}.csr.pem |
|
|
-out certs/{{inventory_hostname}}-{{certificate_name}}.cert.pem |
|
|
-out certs/{{inventory_hostname}}-{{certificate_name}}.cert.pem |
|
@@ -47,3 +47,21 @@ |
|
|
copy: |
|
|
copy: |
|
|
src: host_files/{{inventory_hostname}}/certificate/{{certificate_name}}.cert.pem |
|
|
src: host_files/{{inventory_hostname}}/certificate/{{certificate_name}}.cert.pem |
|
|
dest: "{{ certificate_file }}" |
|
|
dest: "{{ certificate_file }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: fetch root certificate chain |
|
|
|
|
|
fetch: |
|
|
|
|
|
src: "{{ certificate_authority_directory }}/certs/ca.fullchain.pem" |
|
|
|
|
|
dest: host_files/{{inventory_hostname}}/certificate/{{certificate_name}}.chain.pem |
|
|
|
|
|
flat: yes |
|
|
|
|
|
fail_on_missing: yes |
|
|
|
|
|
delegate_to: "{{ certificate_authority_host }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: copy root certificate chain |
|
|
|
|
|
copy: |
|
|
|
|
|
src: host_files/{{inventory_hostname}}/certificate/{{certificate_name}}.chain.pem |
|
|
|
|
|
dest: "{{ certificate_chain_file }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: create full certificate chain |
|
|
|
|
|
template: |
|
|
|
|
|
src: fullchain.pam.j2 |
|
|
|
|
|
dest: "{{ certificate_fullchain_file }}" |