|
|
@ -24,9 +24,12 @@ |
|
|
|
mode: 0644 |
|
|
|
when: vault_ca_gen.status == 200 |
|
|
|
|
|
|
|
- name: "bootstrap/gen_ca | Copy {{ gen_ca_mount_path }} root CA key locally" |
|
|
|
|
|
|
|
- name: "bootstrap/gen_ca | Copy {{ gen_ca_mount_path }} root CA key to necessary hosts" |
|
|
|
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 |
|
|
|
delegate_to: "{{ item }}" |
|
|
|
with_items: "{{ (groups[gen_ca_copy_group|default('vault')]) | union(groups['vault']) }}" |