I have a playbook with vault, and I can run it through:
ansible-playbook info.yml --ask-vault-pass
Now, I want to run my playbook api in An
Use VaultSecret class instead of string password:
VaultSecret
from ansible.module_utils._text import to_bytes from ansible.parsing.vault import VaultSecret loader.set_vault_secrets([('default',VaultSecret(_bytes=to_bytes('123456')))])