I've been trying to get a new server to work without luck. This windows 
2008R2 server has the local Administrator account and an account called 
AnsibleControlAdmin, member of the Administrators group.
In group_vars, I have a variable called ansible_user=AnsibleControlAdmin.
On the command line I have been trying: 

[noel.verhoeven@ansible ansible]$ ansible mx01 -m win_ping -u *Administrator 
*-k -vvvv
Using /home/noel.verhoeven/work/ivv-test/ansible/ansible.cfg as config file
SSH password: 
Loading callback plugin minimal of type stdout, v2.0 from 
/usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
Using module file 
/usr/lib/python2.7/site-packages/ansible/modules/core/windows/win_ping.ps1le 

<192.168.1.12> ESTABLISH WINRM CONNECTION FOR USER: *AnsibleControlAdmin* 
on PORT 5985 TO 192.168.1.12
mx01 | UNREACHABLE! => {
    "changed": false, 
    "msg": "plaintext: the specified credentials were rejected by the 
server", 
    "unreachable": true
}
[noel.verhoeven@ansible ansible]$ 

<rant on>
After a lot of tries, and headscratching I finally notice that the call was 
made for AnsibleControlAdmin instead of Administrator. Somehow the command 
line option does not override the group_var definitions.
Googling I see lots of references to this issue, all finally saying that it 
"*works as designed" *and *"works as intended*". I sort of cannot disagree, 
but I guess most people intent to use this differently. Therefore the 
design is rubbish. I agree that it works as designed. But, who uses ansible 
without some user defined in the variables?

However, this design decision has been very very expensive, costing lots of 
hours of wasted time. The difference between command line options, and 
extra vars is far from clear or intuitive. This should be at least 
somewhere in the documentation page for variable precedence with a big 
warning. Ansible is a really nice tool, but these simple things make it 
seem rather unprofessional.
<rant off>

Can I please update the documentation?

-- 
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/754166f4-fcdc-417d-b6db-4ecd7406254e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to