-
NetBox versionv3.2.5 Python version3.9 Steps to ReproduceEnvironment: Sandbox closed Trying to get ansible to connect to Netbox API with simple playbook:
"msg": "Failed to establish connection to NetBox API" The server works fine via my browser. I have also used Postman to access the Netbox API using my token with success using get devices and my devices were returned so I know the server and API are working. Expected BehaviorShould add a region California to Netbox Observed BehaviorThe full traceback is: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Aside: your pasted playbook and log show in a garbled fashion. If you edit your post and put three backticks ( An error in If that's not it, try tcpdump or wireshark to look at the traffic to/from Netbox. |
Beta Was this translation helpful? Give feedback.
-
Looks like this is not a Netbox v3.2.5 problem but and issue with the ansible collection netbox.netbox. Looking at the netbox.netbox discussions they recommend trying setting validate_certs to either no or False, neither works. I would think if I set validate_certs to either no or False it should work with self signed certs. For now I have removed my self signed cert in nginx and just using it with no self signed certs. This allows my ansible playbooks to work. |
Beta Was this translation helpful? Give feedback.
Looks like this is not a Netbox v3.2.5 problem but and issue with the ansible collection netbox.netbox. Looking at the netbox.netbox discussions they recommend trying setting validate_certs to either no or False, neither works. I would think if I set validate_certs to either no or False it should work with self signed certs. For now I have removed my self signed cert in nginx and just using it with no self signed certs. This allows my ansible playbooks to work.