I believe your issue is that ansible_winrm_server_cert_validation is being
loaded with your include_vars directive in the playbook and the way
connection vars with Ansible before the current devel branch had a few
issues. I would recommend you add
[all:vars]
Hi Jordan, Thank you for the suggestion on the inventory management. We can
currently target any instance based on their tags. here is the command I am
using to issue the playbook.
*ansible-playbook playbooks/windows.yml -e "target=tag_product_cse"*
*Here is the information you requested. *
I believe I may know what is happening and this was fixed in the latest
devel branch so you can try that out if you like. Looks like it is failing
to gather facts before it gets to your debug task, can you set *gather_facts:
no* in your playbook as I'm really curious if the cert validation is
@jordan I completely agree. Although I have clearly stated in the
group_vars/windwos.yml file to ignore cert validation it does not appear to
acknowledge the setting.
With the tasks/main.yml file now looking like this:
---
# Obtain information about a folder
- debug:
var:
For some reason the ansible_winrm_server_cert_validation: ignore var is not
being set for your Windows host hence the error. Can you test out the
following before your win_stat task when running on the Windows host.
- debug:
var: ansible_winrm_server_cert_validation
--
You received this
Hey there,
I was just cutting my teeth on executing playbooks against Windows. To add
to Tony's piece about the PowerShell script
ConfiguringRemotingforAnsible.ps1 which I had to do I also had to pip
install the following on the control machine within side my virtualenv:
pip install pywinrm
Thank you for responding.
I am able to telnet to the windows machine without a problem. But the
playbook still presented the same error when it was run.
I ran the following commands on the windwos machine:
winrm delete winrm/config/Listener?Address=*+Transport=HTTP
winrm delete
You can also try removing the existing listeners and then run
ConfigureRemotingForAnsible.ps1 which will recreate the self-signed ssl
certificate using the following commands
winrm delete winrm/config/Listener?Address=*+Transport=HTTP
winrm delete
Try running "ConfigureRemotingForAnsible.ps1" on the windows host you are
trying to manage with Ansible.
If that doesn't work try this command on the ansible host
telnet windows-host-name 5985
telnet windows-host-name 5986
If you see "Trying ..." but times out, the maybe the network ACL is not