|
@ -26,7 +26,7 @@ |
|
|
mode: "{{ issue_cert_dir_mode | d('0755') }}" |
|
|
mode: "{{ issue_cert_dir_mode | d('0755') }}" |
|
|
owner: "{{ issue_cert_file_owner | d('root') }}" |
|
|
owner: "{{ issue_cert_file_owner | d('root') }}" |
|
|
|
|
|
|
|
|
- name: issue_cert | Generate the cert |
|
|
|
|
|
|
|
|
- name: "issue_cert | Generate the cert for {{ issue_cert_role }}" |
|
|
uri: |
|
|
uri: |
|
|
url: "{{ issue_cert_url }}/v1/{{ issue_cert_mount|d('pki') }}/issue/{{ issue_cert_role }}" |
|
|
url: "{{ issue_cert_url }}/v1/{{ issue_cert_mount|d('pki') }}/issue/{{ issue_cert_role }}" |
|
|
headers: "{{ issue_cert_headers }}" |
|
|
headers: "{{ issue_cert_headers }}" |
|
@ -40,7 +40,7 @@ |
|
|
register: issue_cert_result |
|
|
register: issue_cert_result |
|
|
when: inventory_hostname == issue_cert_hosts|first |
|
|
when: inventory_hostname == issue_cert_hosts|first |
|
|
|
|
|
|
|
|
- name: issue_cert | Copy the cert to all hosts |
|
|
|
|
|
|
|
|
- name: "issue_cert | Copy {{ issue_cert_path }} cert to all hosts" |
|
|
copy: |
|
|
copy: |
|
|
content: "{{ hostvars[issue_cert_hosts|first]['issue_cert_result']['json']['data']['certificate'] }}" |
|
|
content: "{{ hostvars[issue_cert_hosts|first]['issue_cert_result']['json']['data']['certificate'] }}" |
|
|
dest: "{{ issue_cert_path }}" |
|
|
dest: "{{ issue_cert_path }}" |
|
@ -48,7 +48,7 @@ |
|
|
mode: "{{ issue_cert_file_mode | d('0644') }}" |
|
|
mode: "{{ issue_cert_file_mode | d('0644') }}" |
|
|
owner: "{{ issue_cert_file_owner | d('root') }}" |
|
|
owner: "{{ issue_cert_file_owner | d('root') }}" |
|
|
|
|
|
|
|
|
- name: issue_cert | Copy the key to all hosts |
|
|
|
|
|
|
|
|
- name: "issue_cert | Copy key for {{ issue_cert_path }} to all hosts" |
|
|
copy: |
|
|
copy: |
|
|
content: "{{ hostvars[issue_cert_hosts|first]['issue_cert_result']['json']['data']['private_key'] }}" |
|
|
content: "{{ hostvars[issue_cert_hosts|first]['issue_cert_result']['json']['data']['private_key'] }}" |
|
|
dest: "{{ issue_cert_path.rsplit('.', 1)|first }}-key.{{ issue_cert_path.rsplit('.', 1)|last }}" |
|
|
dest: "{{ issue_cert_path.rsplit('.', 1)|first }}-key.{{ issue_cert_path.rsplit('.', 1)|last }}" |
|
|