Hi,
We are using the mentioned connection variables and below are the inventory file details:
[windows]
remote_host
[windows:vars]
ansible_user: admin
ansible_password: admin
ansible_connection: winrm
ansible_winrm_transport: basic
ansible_port: 5986
ansible_winrm_server_cert_validation: ignore
validate_certs: false
And executed playbook as mentioned by placing -vvv:
[WARNING]: Unable to parse /home/f2/.ansible/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’
PLAYBOOK: wincopy.yml ***************************************************************************************************************************
1 plays in wincopy.yml
PLAY [Configurations for windows instance] ******************************************************************************************************
META: ran handlers
TASK [A single debug statement] *****************************************************************************************************************
task path: /home/f2/.ansible/wincopy.yml:7
<remote_host> ESTABLISH SSH CONNECTION FOR USER: None
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/f2/.ansible/cp/56de033974 [WARNING]: Unable to parse /home/f2/.ansible/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’
PLAYBOOK: wincopy.yml ***************************************************************************************************************************
1 plays in wincopy.yml
PLAY [Configurations for windows instance] ******************************************************************************************************
META: ran handlers
TASK [A single debug statement] *****************************************************************************************************************
task path: /home/f2/.ansible/wincopy.yml:7
<remote_host> ESTABLISH SSH CONNECTION FOR USER: None
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/f2c34c90-9efb-4ea2-afcc-f24ace01/.ansible/cp/56de033974 40.71.47.192 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’"‘’
<remote_host> (255, ‘’, ‘ssh: connect to host remote_host port 22: Connection timed out\r\n’)
fatal: [remote_host]: UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: ssh: connect to host remote_host port 22: Connection timed out”,
“unreachable”: true
}
to retry, use: --limit @/home/f2/.ansible/wincopy.retry
PLAY RECAP **************************************************************************************************************************************
remote_host : ok=0 changed=0 unreachable=1 failed=0 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’"‘’
<remote_host> (255, ‘’, ‘ssh: connect to host remote_host port 22: Connection timed out\r\n’)
fatal: [remote_host]: UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: ssh: connect to host remote_host port 22: Connection timed out”,
“unreachable”: true
}
to retry, use: --limit @/home/f2/.ansible/wincopy.retry
PLAY RECAP **************************************************************************************************************************************
remote_host : ok=0 changed=0 unreachable=1 failed=0