mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-16 18:50:08 -03:30
Adding the Vault role
This commit is contained in:
34
roles/vault/tasks/bootstrap/sync_etcd_node_certs.yml
Normal file
34
roles/vault/tasks/bootstrap/sync_etcd_node_certs.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
|
||||
- name: bootstrap/sync_etcd_node_certs | Create list of certs needing creation
|
||||
set_fact:
|
||||
vault_etcd_node_cert_list: "{{ vault_etcd_node_cert_list|default([]) + ['node-' + item + '.pem'] }}"
|
||||
with_items: "{{ groups['k8s-cluster'] | union(groups.etcd) }}"
|
||||
|
||||
- include: ../sync_file.yml
|
||||
vars:
|
||||
sync_file: "{{ item }}"
|
||||
sync_file_dir: "{{ etcd_cert_dir }}"
|
||||
sync_file_hosts: "{{ groups['k8s-cluster'] | union(groups.etcd) }}"
|
||||
sync_file_is_cert: true
|
||||
with_items: "{{ vault_etcd_node_cert_list|default([]) }}"
|
||||
|
||||
- name: bootstrap/sync_etcd_node_certs | Set facts for etcd sync_file results
|
||||
set_fact:
|
||||
vault_etcd_node_certs_needed: "{{ vault_etcd_node_certs_needed|default([]) + [item.path] }}"
|
||||
with_items: "{{ sync_file_results }}"
|
||||
when: item.no_srcs|bool
|
||||
|
||||
- name: bootstrap/sync_etcd_node_certs | Unset sync_file_results after etcd node certs
|
||||
set_fact:
|
||||
sync_file_results: []
|
||||
|
||||
- include: ../sync_file.yml
|
||||
vars:
|
||||
sync_file: ca.pem
|
||||
sync_file_dir: "{{ etcd_cert_dir }}"
|
||||
sync_file_hosts: "{{ groups['k8s-cluster']| union(groups.etcd) }}"
|
||||
|
||||
- name: bootstrap/sync_etcd_node_certs | Unset sync_file_results after ca.pem
|
||||
set_fact:
|
||||
sync_file_results: []
|
||||
Reference in New Issue
Block a user