I am trying to allow my Ansible controller to connect to my ServiceNow instance through an HTTP proxy using the “snow_record” and “snow_record_find” modules. I am running Ansible v2.9.10 with the Python “pysnow” v0.7.16 package and am unable to find a work around for the following SSL verification error:
Are you using something like ADFS or you can connect to Servicenow directly using servicenow URL?
Please port 5985 and ansbile_scheme_conntion= http
Hi @Ankit. I am not using ADFS. I am successfully able to authenticate to ServiceNow when using the URI module or browsing to it using a browser.
Port 5985 is related to WinRM. I’m not sure I understand what you’re recommending. Any additional details you can provide would be greatly appreciated.
I thought the same thing I think he is referring to (https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html)
Not sure how that helps here.
I am far from an expert on this:
But what I usually do is shell to that machine using the “ansible user account” and ensure things are setup to allow that communication to occur…
ie setup:
export {HTTP,HTTPS}_PROXY=http://a:a@x.x.x.x:3128/
export {http,https}_proxy=http://a:a@x.x.x.x:3128/
echo “export {HTTP,HTTPS}_PROXY=http://a:a@x.x.x.x:3128/” > /etc/profile.d/http_proxy.sh
echo “export {http,https}_proxy=http://a:a@x.x.x.x:3128/” > /etc/profile.d/http_proxy.sh
Then when I get that working in that account context then I retry the playbook. But the python code itself needs to use it… so its a matter of if the code takes those environmental variables into effect or not.
There clearly are ansible ways to set above. Just thought I would chime in becasue I feel your pain.
Hi Steven,
I see the same issue when connecting to ServiceNow. By any chance, were you able to fix this issue?
Thanks,
Jagadish