First, let me explain why, hosts are considered 'more specific' than config or command line options. HostA can have an Administrator account, HostB an admin one, the rest of the hosts can have multiple/none configured, as such the command line and config can set a 'default' account with which to try to connect, but specific hosts are allowed to override it.
This is a common problem with heterogeneous environments, but it does trip up those that have a homogeneous one as Ansible tries to serve both. FYI, it is already documented here (at the bottom of the section): http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable But we are open to better/clearer ways of explaining this, the docs are part of the main repo so you can open a pull request to update them just like any part of the code https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/playbooks_variables.rst. ---------- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7ftCfgk%3D8RPv69Mr0MUwT2hE59B8mKBXSf4xsYWk1s6Rg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
