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.

27 lines
841 B

  1. ---
  2. - name: "shared/mount | Test if {{ pki_mount_path }} PKI mount exists"
  3. uri:
  4. url: "{{ vault_leader_url }}/v1/sys/mounts/{{ pki_mount_path }}/tune"
  5. headers: "{{ vault_headers }}"
  6. ignore_errors: true
  7. register: vault_pki_mount_check
  8. - name: shared/mount | Set pki mount type
  9. set_fact:
  10. mount_options: "{{ pki_mount_options | combine({'type': 'pki'}) }}"
  11. when: vault_pki_mount_check|failed
  12. - name: shared/mount | Mount {{ pki_mount_path }} PKI mount if needed
  13. uri:
  14. url: "{{ vault_leader_url }}/v1/sys/mounts/{{ pki_mount_path }}"
  15. headers: "{{ vault_headers }}"
  16. method: POST
  17. body_format: json
  18. body: "{{ mount_options|d() }}"
  19. status_code: 204
  20. when: vault_pki_mount_check|failed
  21. - name: shared/mount | Unset mount options
  22. set_fact:
  23. mount_options: {}
  24. when: vault_pki_mount_check|failed