How can i setup windows host to communicate with Ansible control node on a production environment securely.Can i run the below script with
[switch]$DisableBasicAuth = $true
You need to use the following variables/extra vars for your playbook to connect to windows hosts ofcourse after the initial configuration on windows server to accept incoming connection is done.
ansible_connection: winrm ansible_winrm_message_encryption: auto ansible_winrm_port: 5985 ansible_winrm_transport: ntlm
Use below variables and also the check the ansible is using correct python and enable the ports in windows hosts.
ansible_connection: winrm
ansible_port: 5985
ansible_winrm_scheme: http
ansible_winrm_server_cert_validation: ignore
ansible_winrm_transport: ntlm