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.

51 lines
1.5 KiB

  1. ---
  2. - import_tasks: ../shared/check_vault.yml
  3. when: inventory_hostname in groups.vault
  4. - import_tasks: ../shared/check_etcd.yml
  5. when: inventory_hostname in groups.vault
  6. - import_tasks: configure.yml
  7. when: inventory_hostname in groups.vault
  8. - import_tasks: binary.yml
  9. when: inventory_hostname in groups.vault and vault_deployment_type == "host"
  10. - import_tasks: systemd.yml
  11. when: inventory_hostname in groups.vault
  12. - import_tasks: init.yml
  13. when: inventory_hostname in groups.vault
  14. - import_tasks: unseal.yml
  15. when: inventory_hostname in groups.vault
  16. - import_tasks: ../shared/find_leader.yml
  17. when: inventory_hostname in groups.vault
  18. - import_tasks: create_mounts.yml
  19. when: inventory_hostname == groups.vault|first
  20. - include_tasks: ../shared/gen_ca.yml
  21. vars:
  22. gen_ca_cert_dir: "{{ vault_pki_mounts.kube.cert_dir }}"
  23. gen_ca_mount_path: "{{ vault_pki_mounts.kube.name }}"
  24. gen_ca_vault_headers: "{{ vault_headers }}"
  25. gen_ca_vault_options: "{{ vault_ca_options.kube }}"
  26. when: inventory_hostname in groups.vault
  27. - include_tasks: ../shared/auth_backend.yml
  28. vars:
  29. auth_backend_description: A Username/Password Auth Backend primarily used for services needing to issue certificates
  30. auth_backend_path: userpass
  31. auth_backend_type: userpass
  32. when: inventory_hostname == groups.vault|first
  33. - include_tasks: create_roles.yml
  34. with_items:
  35. - "{{ vault_pki_mounts.vault }}"
  36. - "{{ vault_pki_mounts.etcd }}"
  37. - "{{ vault_pki_mounts.kube }}"
  38. loop_control:
  39. loop_var: mount
  40. when: inventory_hostname in groups.vault