2017-01-14 04:31:10 +08:00
|
|
|
---
|
2018-05-12 00:11:38 +08:00
|
|
|
- import_tasks: ../shared/check_etcd.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-05-12 00:11:38 +08:00
|
|
|
- import_tasks: ../shared/check_vault.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: configure.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: binary.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault and vault_deployment_type == "host"
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: systemd.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-05-12 00:11:38 +08:00
|
|
|
- import_tasks: ../shared/find_leader.yml
|
|
|
|
when: inventory_hostname in groups.vault
|
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: init.yml
|
2017-01-14 04:31:10 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: unseal.yml
|
2017-01-14 04:31:10 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: ../shared/find_leader.yml
|
2017-02-09 05:41:36 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- import_tasks: create_mounts.yml
|
2017-08-30 21:03:22 +08:00
|
|
|
when: inventory_hostname == groups.vault|first
|
2017-01-14 04:31:10 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- include_tasks: ../shared/gen_ca.yml
|
2017-08-30 21:03:22 +08:00
|
|
|
vars:
|
2017-09-02 03:51:37 +08:00
|
|
|
gen_ca_cert_dir: "{{ vault_pki_mounts.kube.cert_dir }}"
|
2018-05-12 00:11:38 +08:00
|
|
|
gen_ca_mount_path: "/{{ vault_pki_mounts.kube.name }}"
|
2017-09-02 03:51:37 +08:00
|
|
|
gen_ca_vault_headers: "{{ vault_headers }}"
|
|
|
|
gen_ca_vault_options: "{{ vault_ca_options.kube }}"
|
2018-04-11 00:55:28 +08:00
|
|
|
gen_ca_copy_group: "kube-master"
|
2017-08-30 21:03:22 +08:00
|
|
|
when: inventory_hostname in groups.vault
|
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- include_tasks: ../shared/auth_backend.yml
|
2017-09-02 03:51:37 +08:00
|
|
|
vars:
|
|
|
|
auth_backend_description: A Username/Password Auth Backend primarily used for services needing to issue certificates
|
|
|
|
auth_backend_path: userpass
|
|
|
|
auth_backend_type: userpass
|
|
|
|
when: inventory_hostname == groups.vault|first
|
2017-02-18 05:22:34 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- include_tasks: create_roles.yml
|
2017-09-08 04:30:16 +08:00
|
|
|
with_items:
|
|
|
|
- "{{ vault_pki_mounts.vault }}"
|
|
|
|
- "{{ vault_pki_mounts.etcd }}"
|
|
|
|
- "{{ vault_pki_mounts.kube }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: mount
|
2017-09-05 16:05:06 +08:00
|
|
|
when: inventory_hostname in groups.vault
|