11 lines
418 B
YAML
11 lines
418 B
YAML
---
|
|
- hosts: all
|
|
tasks:
|
|
- name: Get password from Vault
|
|
ansible.builtin.debug:
|
|
msg: "{{ lookup('hashi_vault', 'secret=secret/hostname2 token=hvs.CAESIOy5Troiesm65BQYj_QhF996yilil8whnWP5FWHp3eE8Gh4KHGh2cy40OTBCT09SdTl1c3FRNmFXenFBUmxVSkE url=http://vault.vault:8200') }}"
|
|
register: vault_result
|
|
|
|
- name: Use password from Vault
|
|
ansible.builtin.command: echo "{{ vault_result.msg }}"
|