Hi Brian,
thanks for the explanation. It is clear to me now. I'm currently running a 
heterogeneous environment so I do have multiple user accounts/passwords for 
various hosts in the configuration files/vault. But I was experimenting and 
thought I could override all with the command line.

I was not familiar with the piece of text you reference, below the 
footnotes / notes. That explains things clearly. I guess sometimes the 
documentation can be overwhelming.

One thing I'd like to do is add to the documentation (explaining the 
ansible command line options) that these command line options do not 
override theses user settings and maybe reference the piece of doc you 
pointed to. However, I cannot find an explanation of the command line 
options in the documentation. Only when you run ansible without arguments 
you get this list.
Am I missing this in the documentation?

Noel

On Monday, February 6, 2017 at 4:23:16 PM UTC+1, Brian Coca wrote:
>
> 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/0b50a149-e15a-4d26-859e-31b79a4c9d77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to