mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-14 12:57:45 -02:30
refactor vault role (#2733)
* Move front-proxy-client certs back to kube mount We want the same CA for all k8s certs * Refactor vault to use a third party module The module adds idempotency and reduces some of the repetitive logic in the vault role Requires ansible-modules-hashivault on ansible node and hvac on the vault hosts themselves Add upgrade test scenario Remove bootstrap-os tags from tasks * fix upgrade issues * improve unseal logic * specify ca and fix etcd check * Fix initialization check bump machine size
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
---
|
||||
- name: shared/gen_userpass | Create the Username/Password combo for the role
|
||||
uri:
|
||||
url: "{{ hostvars[groups.vault|first]['vault_leader_url'] }}/v1/auth/userpass/users/{{ gen_userpass_username }}"
|
||||
headers: "{{ hostvars[groups.vault|first]['vault_headers'] }}"
|
||||
method: POST
|
||||
body_format: json
|
||||
body:
|
||||
username: "{{ gen_userpass_username }}"
|
||||
password: "{{ gen_userpass_password }}"
|
||||
policies: "{{ gen_userpass_role }}"
|
||||
status_code: 204
|
||||
delegate_to: "{{ groups.vault|first }}"
|
||||
hashivault_userpass_create:
|
||||
url: "{{ vault_leader_url }}"
|
||||
token: "{{ vault_root_token }}"
|
||||
ca_cert: "{{ vault_cert_dir }}/ca.pem"
|
||||
name: "{{ gen_userpass_username }}"
|
||||
pass: "{{ gen_userpass_password }}"
|
||||
policies:
|
||||
- "{{ gen_userpass_role }}"
|
||||
run_once: true
|
||||
|
||||
- name: shared/gen_userpass | Ensure destination directory exists
|
||||
|
||||
Reference in New Issue
Block a user