mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-09 10:27:39 -02:30
Adding the Vault role
This commit is contained in:
19
roles/vault/tasks/config_ca.yml
Normal file
19
roles/vault/tasks/config_ca.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user