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.
18 lines
713 B
18 lines
713 B
- hosts: localhost
|
|
tasks:
|
|
- name: Read a kv2 secret with the default mount point
|
|
vars:
|
|
ansible_hashi_vault_auth_method: ldap
|
|
ansible_hashi_vault_username: username
|
|
ansible_hashi_vault_password: pwd
|
|
ansible_hashi_vault_engine_mount_point: kv
|
|
ansible.builtin.set_fact:
|
|
response: "{{ lookup('community.hashi_vault.vault_kv2_get', 'secret', url='https://vault.domain.local') }}"
|
|
|
|
- name: Display the results
|
|
ansible.builtin.debug:
|
|
msg:
|
|
- "Secret: {{ response.secret }}"
|
|
- "Data: {{ response.data }} (contains secret data & metadata in kv2)"
|
|
- "Metadata: {{ response.metadata }}"
|
|
- "Full response: {{ response.raw }}" |