2017-01-13 20:31:10 +00:00
|
|
|
---
|
2018-01-29 11:37:48 +00:00
|
|
|
- include_tasks: ../shared/sync_file.yml
|
2017-01-13 20:31:10 +00:00
|
|
|
vars:
|
|
|
|
sync_file: "ca.pem"
|
|
|
|
sync_file_dir: "{{ vault_cert_dir }}"
|
|
|
|
sync_file_hosts: "{{ groups.vault }}"
|
2018-07-11 11:58:02 +00:00
|
|
|
sync_file_owner: vault
|
|
|
|
sync_file_group: root
|
2017-01-13 20:31:10 +00:00
|
|
|
sync_file_is_cert: true
|
|
|
|
|
2017-02-08 21:41:36 +00:00
|
|
|
- name: bootstrap/sync_vault_certs | Set facts for vault sync_file results
|
2017-01-13 20:31:10 +00:00
|
|
|
set_fact:
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_ca_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
|
2017-01-13 20:31:10 +00:00
|
|
|
|
|
|
|
- name: bootstrap/sync_vault_certs | Unset sync_file_results after ca.pem sync
|
|
|
|
set_fact:
|
|
|
|
sync_file_results: []
|
|
|
|
|
2018-05-11 16:11:38 +00:00
|
|
|
# FIXME: Distribute ca.pem alone in a better way
|
|
|
|
- include_tasks: ../shared/sync_file.yml
|
|
|
|
vars:
|
|
|
|
sync_file: "ca.pem"
|
|
|
|
sync_file_dir: "{{ vault_cert_dir }}"
|
|
|
|
sync_file_hosts: "{{ groups['kube-master'] }}"
|
2018-07-11 11:58:02 +00:00
|
|
|
sync_file_owner: vault
|
|
|
|
sync_file_group: root
|
2018-05-11 16:11:38 +00:00
|
|
|
sync_file_is_cert: false
|
|
|
|
|
|
|
|
- name: bootstrap/sync_vault_certs | Set facts for vault sync_file results
|
|
|
|
set_fact:
|
|
|
|
vault_ca_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
|
|
|
|
|
|
|
|
- name: bootstrap/sync_vault_certs | Unset sync_file_results after ca.pem sync
|
|
|
|
set_fact:
|
|
|
|
sync_file_results: []
|
|
|
|
|
|
|
|
|
2018-01-29 11:37:48 +00:00
|
|
|
- include_tasks: ../shared/sync_file.yml
|
2017-01-13 20:31:10 +00:00
|
|
|
vars:
|
|
|
|
sync_file: "api.pem"
|
|
|
|
sync_file_dir: "{{ vault_cert_dir }}"
|
|
|
|
sync_file_hosts: "{{ groups.vault }}"
|
2018-07-11 11:58:02 +00:00
|
|
|
sync_file_owner: vault
|
|
|
|
sync_file_group: root
|
2017-01-13 20:31:10 +00:00
|
|
|
sync_file_is_cert: true
|
|
|
|
|
|
|
|
- name: bootstrap/sync_vault_certs | Set fact if Vault's API cert is needed
|
|
|
|
set_fact:
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_api_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
|
2017-01-13 20:31:10 +00:00
|
|
|
|
|
|
|
- name: bootstrap/sync_vault_certs | Unset sync_file_results after api.pem sync
|
|
|
|
set_fact:
|
|
|
|
sync_file_results: []
|