1. You have a typo when you specify kerberos auth, it should be 
   'ansible_winrm_transport' but you have 'anisble_winrm_transport'
   2. validate_certs: false doesn't affect WinRM cert validation, that's 
   just a standard var
   3. You shouldn't have to set ansible_winrm_read_timeout_sec at all, it's 
   rarely ever needed
   4. You are saying to run on windows_server, based on your hosts file 
   it's not part of any groups, the windows group doesn't have a member anyway 
   so those vars won't apply
   
On Friday, July 24, 2020 at 9:59:42 AM UTC+10 Work-Hard wrote:

> 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
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/02528135-9bac-4e3f-be0f-7d4a23d94d19n%40googlegroups.com.

Reply via email to