winrm inventory ansible_user masked by prior ansible_ssh_user setting #39844
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
windows
Windows community
ISSUE TYPE
COMPONENT NAME
ansible windows -m win_ping
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
[root@bastion ~]# uname -a
Linux bastion.64f7.example.opentlc.com 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@bastion ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[root@bastion ~]#
ansible 2.5.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
SUMMARY
STEPS TO REPRODUCE
Inventory file:
[GenericExample:vars]
###########################################################################
Ansible Vars
###########################################################################
timeout=60
ansible_become=yes
ansible_ssh_user=ec2-user
[GenericExample:children]
towers
windows
support
[towers]
These are the towers
tower1.64f7.internal public_host_name=tower1.64f7.example.opentlc.com ssh_host=ec2-18-206-6-9.compute-1.amazonaws.com
tower2.64f7.internal public_host_name=tower2.64f7.example.opentlc.com ssh_host=ec2-18-206-63-217.compute-1.amazonaws.com
tower3.64f7.internal public_host_name=tower3.64f7.example.opentlc.com ssh_host=ec2-34-196-43-6.compute-1.amazonaws.com
[windows]
These are the activedirectory servers
ad1.64f7.internal ssh_host=ad1.64f7.example.opentlc.com ansible_password=jVMijRwLbI02gFCo2xkjlZ9lxEA7bm7zgg==
These are the supporthosts
[support]
support1.64f7.internal ssh_host=ec2-35-173-156-182.compute-1.amazonaws.com
support2.64f7.internal ssh_host=ec2-34-233-234-242.compute-1.amazonaws.com
[windows:vars]
ansible_connection=winrm
ansible_port=5986
ansible_ssh_port=5986
ansible_user=Administrator
ansible_winrm_server_cert_validation=ignore
ansible_winrm_transport=basic
ansible_become=false
Command: ansible windows -m win_ping
EXPECTED RESULTS
Succesful ping
ACTUAL RESULTS
If the inventory file is edited to change the (depreciated) [all:vars] ansible_ssh_user to ansible_user command completes successfully.
Suggests that the [all]ansible_ssh_user masks the {windows]ansible_user
The text was updated successfully, but these errors were encountered: