Closed mirzawaqasahmed closed 6 years ago
This is always caused by incorrect login credentials, invalid hostnames/addresses, or incorrect ports.
Is your inventory hostname resolvable in dns?
Its all set, if i dont change anything and change the environment to 2.4.3.0 it works without any issue.
@mirzawaqasahmed you might want to try the 2.6.0 development code because there were several connection related fixes added.
@caphrim007 just tried using pip install git+https://github.com/ansible/ansible.git@devel
and got the following error
fatal: [f5-lab]: FAILED! => {"changed": false, "msg": "Unable to connect to f5-lab on port None. The reported error was \"Unexpected **kwargs: {'verify': False}\"."}
@mirzawaqasahmed does the following command show successful output?
ping f5-lab
literally that command
btw, there is a bug you've identified with the port not being reported correctly, but it is only cosmetic. It will be fixed before 2.6 is released
@caphrim007 yes the ping command shows successfull... As mentioned in the beginning it runs with no issue on the same host with another version of ansible.
@mirzawaqasahmed try the updated stable-2.6 branch in the ansible repo where i've added the fixes I mentioned. Do you have a hosts file entry for the f5-lab machine? This is not a normal hostname and would otherwise not resolve unless a DNS search domain or hosts entry existed
here you go
[waqas@ubuntu:~] $ ping f5-lab
PING f5-lab (192.168.180.6) 56(84) bytes of data.
64 bytes from f5-lab (192.168.180.6): icmp_seq=1 ttl=64 time=20.0 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=2 ttl=64 time=0.370 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=3 ttl=64 time=0.324 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=4 ttl=64 time=0.335 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=5 ttl=64 time=2.14 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=6 ttl=64 time=0.339 ms
64 bytes from f5-lab (192.168.180.6): icmp_seq=7 ttl=64 time=0.461 ms
when i use the above branch it throws a new error now.
fatal: [f5-lab]: FAILED! => {"changed": false, "msg": "Unable to connect to f5-lab on port 443. The reported error was \"Unexpected **kwargs: {'verify': True}\"."}
and yes the name is masked...but the pings are true
@mirzawaqasahmed I've only ever see that error manifest when the f5-sdk and its dependencies were out of date.
How is your system set up here? Did you install the f5-sdk via pip? Did you ever install any python dependency using apt? is this a virtual env? is python3 the default python at /usr/bin/python?
Upgraded to ansible 2.5.4 and having same issue. f5-sdk was installed using pip...
Yes, I am using virtual env.
$ which python
/home/waqas/.virtualenvs/ansible2.5.4/bin/python
Current versions are as below.
bigsuds 1.0.6
cryptography 2.2.2
f5-icontrol-rest 1.3.8
f5-sdk 3.0.15
ipaddress 1.0.22
pip 10.0.1
six 1.11.0
suds-jurko 0.6 ```
@mirzawaqasahmed are you specifying the ansible_python_interpreter since you're using a virtualenv?
@caphrim007 Yes I am.
@mirzawaqasahmed can you show me how you're specifying the python interpreter? as well as a full playbook that reproduces the error for you? Not just the task.
Hey @caphrim007 just to update...I just re-instantiated the python env and clean installed things...after that it seems to be working. Odd but true. Couldnt find out what is causing the problem. Thanks for all the help though
@mirzawaqasahmed good to hear! Thanks for the update!
ISSUE TYPE
COMPONENT NAME
bigip_gtm_facts
ANSIBLE VERSION
PYTHON VERSION
BIGIP VERSION
LIBRARY VERSIONS
CONFIGURATION
OS / ENVIRONMENT
Ubuntu
SUMMARY
Running a simple old playbook that works in 2.4.x to gather gtm facts but failing in 2.5.x
STEPS TO REPRODUCE
EXPECTED RESULTS
Should return facts
ACTUAL RESULTS