You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

  1. ---
  2. - include: ../shared/check_vault.yml
  3. when: inventory_hostname in groups.vault
  4. - include: ../shared/check_etcd.yml
  5. when: inventory_hostname in groups.vault
  6. ## Vault Cluster Setup
  7. - include: configure.yml
  8. when: inventory_hostname in groups.vault
  9. - include: binary.yml
  10. when: inventory_hostname in groups.vault and vault_deployment_type == "host"
  11. - include: systemd.yml
  12. when: inventory_hostname in groups.vault
  13. - include: init.yml
  14. when: inventory_hostname in groups.vault
  15. - include: unseal.yml
  16. when: inventory_hostname in groups.vault
  17. - include: ../shared/find_leader.yml
  18. when: inventory_hostname in groups.vault
  19. - include: ../shared/create_mount.yml
  20. vars:
  21. create_mount_path: "{{ vault_ca_options.common_name }}"
  22. create_mount_default_lease_ttl: "{{ vault_default_lease_ttl }}"
  23. create_mount_max_lease_ttl: "{{ vault_max_lease_ttl }}"
  24. create_mount_description: "Vault Root CA"
  25. create_mount_cert_dir: "{{ vault_cert_dir }}"
  26. create_mount_config_ca_needed: true
  27. when: inventory_hostname == groups.vault|first
  28. - include: ../shared/create_mount.yml
  29. vars:
  30. create_mount_path: "{{ vault_etcd_mount_path }}"
  31. create_mount_default_lease_ttl: "{{ vault_etcd_default_lease_ttl }}"
  32. create_mount_max_lease_ttl: "{{ vault_etcd_max_lease_ttl }}"
  33. create_mount_description: "Etcd Root CA"
  34. create_mount_cert_dir: "{{ vault_etcd_cert_dir }}"
  35. create_mount_config_ca_needed: true
  36. when: inventory_hostname == groups.vault|first
  37. - include: ../shared/create_mount.yml
  38. vars:
  39. create_mount_path: "{{ vault_kube_mount_path }}"
  40. create_mount_default_lease_ttl: "{{ vault_kube_default_lease_ttl }}"
  41. create_mount_max_lease_ttl: "{{ vault_kube_max_lease_ttl }}"
  42. create_mount_description: "Kubernetes Root CA"
  43. create_mount_cert_dir: "{{ vault_kube_cert_dir }}"
  44. create_mount_config_ca_needed: false
  45. when: inventory_hostname == groups.vault|first
  46. - include: ../shared/gen_ca.yml
  47. vars:
  48. gen_ca_cert_dir: "{{ vault_kube_cert_dir }}"
  49. gen_ca_mount_path: "{{ vault_kube_mount_path }}"
  50. when: inventory_hostname in groups.vault
  51. ## Vault Policies, Roles, and Auth Backends
  52. - include: create_roles.yml