Hello,
my host file for ansible is not reading additional variables. Following is my host file:
[ubuntu]
[amazonlinux2]
[database]
[windows]
[windows:vars]
ansible_connection = winrm
ansible_ssh_port = 5986
ansible_winrm_transport = kerberos
ansible_winrm_server_cert_validation = ignore
validate_certs = false
playbook:
- hosts: windows_server
vars:
ansible_connection: winrm
ansible_ssh_port: 5986
anisble_winrm_transport: kerberos
ansible_winrm_server_cert_validation: ignore
validate_certs: false
ansible_winrm_scheme: https
ansibe_winrm_read_timeout_sec: 30
ignore_unreachable: true
gather_facts: false
If I add [windows_server] call it back the playbook, it won’t read it for some reason and throws out the following error:
<test.domain.com> ESTABLISH WINRM CONNECTION FOR USER: None on PORT 5986 TO test.domain.com
fatal: [test.domain.com]: UNREACHABLE! => {
“changed”: false,
“msg”: “ssl: auth method ssl requires a username”,
“unreachable”: true
It’s using Kerberos authentication where it works for other playbooks. I double-checked by entering -klist and ticket are there.
Any idea why it won’t work?
Thanks,
Jimmy