seems ansible is not reading group_vars/windows.yml
tried renaming to group_vars/windows same result
`
$ ansible --version
ansible 2.2.1.0
$ ansible windows --list-hosts
hosts (1):
ex-domain1
$ cat group_vars/windows.yml
ansible_user: Administrator
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
$ ansible windows -m debug -a msg=“{{ansible_user}}”
ex-domain1 | SUCCESS => {
“msg”: “root”
}
$ cat ansible.cfg
[defaults]
inventory = ./inventory
remote_user = root
roles_path = ./roles
`
Matt_Davis
(Matt Davis)
2
Hrm, running this exact stuff works fine for me on 2.2.1 (from source).
my control machine is ubuntu 16.04, ansible and winrm installed with pip. whats yours? ill try from source.
Matt_Davis
(Matt Davis)
4
Fedora 25, but shouldn’t matter unless somebody horribly broke something in packaging…
Matt_Davis
(Matt Davis)
5
(especially since you installed from pip)
group_vars was in the playbooks directory. moved it to inventory and it worked. group_vars/all
worked fine from the playbooks directory.