mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-09 10:27:39 -02:30
Place vault role credentials only to vault group hosts
This commit is contained in:
@@ -29,13 +29,13 @@
|
||||
- name: "issue_cert | Read in the local credentials"
|
||||
command: cat {{ vault_roles_dir }}/{{ issue_cert_role }}/userpass
|
||||
register: vault_creds_cat
|
||||
delegate_to: "{{ issue_cert_hosts|first }}"
|
||||
delegate_to: "{{ groups.vault|first }}"
|
||||
run_once: true
|
||||
|
||||
- name: gen_certs_vault | Set facts for read Vault Creds
|
||||
set_fact:
|
||||
user_vault_creds: "{{ vault_creds_cat.stdout|from_json }}"
|
||||
delegate_to: "{{ issue_cert_hosts|first }}"
|
||||
delegate_to: "{{ groups.vault|first }}"
|
||||
run_once: true
|
||||
|
||||
- name: gen_certs_vault | Log into Vault and obtain an token
|
||||
@@ -49,7 +49,7 @@
|
||||
body:
|
||||
password: "{{ user_vault_creds.password }}"
|
||||
register: vault_login_result
|
||||
delegate_to: "{{ issue_cert_hosts|first }}"
|
||||
delegate_to: "{{ groups.vault|first }}"
|
||||
run_once: true
|
||||
|
||||
- name: gen_certs_vault | Set fact for vault_client_token
|
||||
|
||||
Reference in New Issue
Block a user