executing command within --extra-vars

7 views
Skip to first unread message

sushant kode

unread,
Dec 3, 2018, 7:45:59 AM12/3/18
to Ansible Project
Hello,

We are using mozilla sops to encrypt our ansible secrets and I want to decrypt the file on the go, something like 

ansible --extra-vars "@<$(sops -d secrets.yaml)"

But ansible doesn't support executing a command within the 'extra-vars'.

The workaround currently I am using is
sops -d secrets.yaml > /tmp/secrets
ansible --extra-vars "@/tmp/secrets"
rm /tmp/secrets

Is there a way to execute a command within the 'extra-vars' ? 

Thanks,
Sushant
Reply all
Reply to author
Forward
0 new messages