19 lines
557 B
YAML
19 lines
557 B
YAML
---
|
|
|
|
- name: config_ca | Read root CA cert for Vault
|
|
command: cat /etc/vault/ssl/ca.pem
|
|
register: vault_ca_cert_cat
|
|
|
|
- name: config_ca | Read root CA key for Vault
|
|
command: cat /etc/vault/ssl/ca-key.pem
|
|
register: vault_ca_key_cat
|
|
|
|
- name: config_ca | Configure pki mount to use the found root CA cert and key
|
|
uri:
|
|
url: "{{ vault_url }}/v1/pki/config/ca"
|
|
headers: "{{ vault_headers }}"
|
|
method: POST
|
|
body_format: json
|
|
body:
|
|
pem_bundle: "{{ vault_ca_cert_cat.stdout + '\n' + vault_ca_key_cat.stdout }}"
|
|
status_code: 204
|