You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
763 B

  1. ---
  2. - name: bootstrap/gen_auth_ca | Generate Root CA
  3. uri:
  4. url: "{{ vault_leader_url }}/v1/auth-pki/root/generate/exported"
  5. headers: "{{ vault_headers }}"
  6. method: POST
  7. body_format: json
  8. body: "{{ vault_ca_options }}"
  9. register: vault_auth_ca_gen
  10. when: inventory_hostname == groups.vault|first
  11. - name: bootstrap/gen_auth_ca | Copy auth CA cert to Vault nodes
  12. copy:
  13. content: "{{ hostvars[groups.vault|first]['vault_auth_ca_gen']['json']['data']['certificate'] }}"
  14. dest: "{{ vault_cert_dir }}/auth-ca.pem"
  15. - name: bootstrap/gen_auth_ca | Copy auth CA key to Vault nodes
  16. copy:
  17. content: "{{ hostvars[groups.vault|first]['vault_auth_ca_gen']['json']['data']['private_key'] }}"
  18. dest: "{{ vault_cert_dir }}/auth-ca-key.pem"