Passing a var file into "EXTRA VARIABLES"

34 views
Skip to first unread message

jturne...@gmail.com

unread,
Nov 16, 2017, 1:05:38 PM11/16/17
to AWX Project
Hi

just setting up tower here, one thing that really has me stumped that I hope there is a simple solution to is how to pass veritable FILES into EXTRA VARIABLES when creating templates. usually when I run a playbook I pass in a fair few files like so --extra-vars @/home/ansible/playbooks/files.yml  --extra-vars @./home/ansible/playbooks/files2.yml etc. The extra vars only seems to let you pass in the pairs as they are in stated files, no option to put the files in.

Any ideas on how I can fix this? Loving the rest of it, there is just this one annoying flaw I would love to get round!

Thanks 

Bill Nottingham

unread,
Nov 16, 2017, 1:10:11 PM11/16/17
to jturne...@gmail.com, AWX Project
Cut and paste the content, there's not another way. If they're in your
source control, move them to group_vars/host_vars?

Bill

Bill Nottingham

unread,
Nov 16, 2017, 1:12:42 PM11/16/17
to jturne...@gmail.com, AWX Project
... although if you're creating the job templates via tower-cli, @<filename>
will work.

Bill

jturne...@gmail.com

unread,
Nov 16, 2017, 1:29:46 PM11/16/17
to AWX Project
Thanks for the quick response Bill,

That is bloody annoying actually, the way everything we have structured all depends on those extra vars getting called in at the last minute. If they are manually in the job template then we will have troubles when things change. I will check out the tower CLI hopefully that will be my savior!

thanks again
Reply all
Reply to author
Forward
0 new messages