Ansible 2 multiple extra vars files

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

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).

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.