# executing command within --extra-vars

**URL:** <https://forum.ansible.com/t/executing-command-within-extra-vars/29178>\
**Category:** Ansible Project\
**Created:** [December 3, 2018, 12:45pm UTC](https://forum.ansible.com/t/executing-command-within-extra-vars/29178 "2018-12-03T12:45:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushant\_kode](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sushant\_kode](https://forum.ansible.com/u/sushant_kode)\
**Post date:** [December 3, 2018, 12:45pm UTC](https://forum.ansible.com/t/executing-command-within-extra-vars/29178/1 "2018-12-03T12:45:59Z")

</div>

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
