parent
ebdf9aa012
commit
e2c9f591b8
@ -0,0 +1,18 @@
|
||||
- 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 }}"
|
Loading…
Reference in new issue