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.

47 lines
1.4 KiB

  1. ---
  2. - include_tasks: ../shared/sync_file.yml
  3. vars:
  4. sync_file: "ca.pem"
  5. sync_file_dir: "{{ vault_cert_dir }}"
  6. sync_file_hosts: "{{ groups.vault }}"
  7. sync_file_is_cert: true
  8. - name: bootstrap/sync_vault_certs | Set facts for vault sync_file results
  9. set_fact:
  10. vault_ca_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
  11. - name: bootstrap/sync_vault_certs | Unset sync_file_results after ca.pem sync
  12. set_fact:
  13. sync_file_results: []
  14. # FIXME: Distribute ca.pem alone in a better way
  15. - include_tasks: ../shared/sync_file.yml
  16. vars:
  17. sync_file: "ca.pem"
  18. sync_file_dir: "{{ vault_cert_dir }}"
  19. sync_file_hosts: "{{ groups['kube-master'] }}"
  20. sync_file_is_cert: false
  21. - name: bootstrap/sync_vault_certs | Set facts for vault sync_file results
  22. set_fact:
  23. vault_ca_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
  24. - name: bootstrap/sync_vault_certs | Unset sync_file_results after ca.pem sync
  25. set_fact:
  26. sync_file_results: []
  27. - include_tasks: ../shared/sync_file.yml
  28. vars:
  29. sync_file: "api.pem"
  30. sync_file_dir: "{{ vault_cert_dir }}"
  31. sync_file_hosts: "{{ groups.vault }}"
  32. sync_file_is_cert: true
  33. - name: bootstrap/sync_vault_certs | Set fact if Vault's API cert is needed
  34. set_fact:
  35. vault_api_cert_needed: "{{ sync_file_results[0]['no_srcs'] }}"
  36. - name: bootstrap/sync_vault_certs | Unset sync_file_results after api.pem sync
  37. set_fact:
  38. sync_file_results: []