I tested the last few days OpenSSH as connection method for windows hosts in Ansible, because we are a mixed environment and I want a similar approach for linux and windows.
I tested for windows 10 and 11 hosts and it is working mostly as expected. The thing which bothers me: If I run a playbook against an inventory where not all windows machines are running I will get an [WARNING]: Failed to collection winrm due to timeout
message after a minute of timeout.
I can remove the warning by using the inventory variable ansible_connection: ssh
Why is it necessary to use this variable if winrm is not in use? I thought ssh is the default connection method of ansible.