Skip to content
Snippets Groups Projects
Commit 0a89f88b authored by Brad Beam's avatar Brad Beam
Browse files

Fixing condition where CA already exists

parent f29a4272
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
method: POST
body_format: json
body: "{{ gen_ca_vault_options }}"
status_code: 200,204
register: vault_ca_gen
delegate_to: "{{ groups.vault|first }}"
run_once: true
......@@ -21,9 +22,11 @@
content: "{{ hostvars[groups.vault|first]['vault_ca_gen']['json']['data']['certificate'] }}"
dest: "{{ gen_ca_cert_dir }}/ca.pem"
mode: 0644
when: vault_ca_gen.status == 200
- name: "bootstrap/gen_ca | Copy {{ gen_ca_mount_path }} root CA key locally"
copy:
content: "{{ hostvars[groups.vault|first]['vault_ca_gen']['json']['data']['private_key'] }}"
dest: "{{ gen_ca_cert_dir }}/ca-key.pem"
mode: 0640
when: vault_ca_gen.status == 200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment