You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi
When running a playbook via Ansible-playbook with the --extra-vars flag I can supply the argument multiple times and all the vars get combined.
My question is what is the order of inheritance within the files if I were to supply the same car in both. For example may be I have a default set of override vars I use all the time but then for certain environments I override the domain var. would the first file in the supplied list trump or the last and is it consistent?
Thanks
Mark
Sent from my iPhone
Brian Coca
unread,
Feb 4, 2016, 10:28:12 AM2/4/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
It is not really inheritance as the files are unrelated to each other,
but as the vars get created they can be overwritten or merged
(ansible.cfg setting should apply) by the 'next file', so the last
file listed should win and it is consistent (same order same results).
--
Brian Coca
Arthur Reyes
unread,
Mar 1, 2016, 4:36:27 PM3/1/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
I have been experimenting with using multiple instances of extra-vars at the command line and I have observed that last in from the command line is the value used at execution time.
ansible-playbook --extra-vars "foo='Yes'" --extra-vars "foo='No'" would pass foo='No' to your playbook. The name space is overwritten every time it is declared.