Closed mborrmann-gaf closed 8 months ago
What do you get when you try
curl -v http(s)://<NETBOX_HOST>/api/status -H "Authorization: Token <TOKEN>"
Filling in NETBOX_URL and TOKEN with correct values for your environment, and using http or https as appropriate
The output of the curl command is as follows:
* Trying <NETBOX-IP>:80...
* Connected to <NETBOX-URL> (<NETBOX-IP>) port 80 (#0)
> GET /api/status HTTP/1.1
> Host: <NETBOX-URL>
> User-Agent: curl/7.76.1
> Accept: */*
> Authorization: Token cb102557eba5d83762a6f3511b0d4f15844f5315
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.22.1
< Date: Tue, 09 Jan 2024 15:20:50 GMT
< Content-Type: text/html
< Content-Length: 169
< Connection: keep-alive
< Location: https://<NETBOX-URL>/api/status
<
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.22.1</center>
</body>
</html>
* Connection #0 to host <NETBOX-URL> left intact
I found the solution! On a closer look to the curl output you can that we redirect all http request to https. I change the netbox_url in the ansible playbook to https an now it works. It seems that the netbox module for ansible isn't capable to follow the https redirect!
Kind regards
Ansible NetBox Collection version
v3.16.0
Ansible version
NetBox version
v3.7.0
Python version
3.9
Steps to Reproduce
I want to add a vlan to our Netbox installation and I am try to do it with the Ansible Netbox vlan module. The following Template is beeing used:
Expected Behavior
Expected is a message, that the vlan was created
Observed Behavior
But I am getting the following error messages:
We already found the issue in the netbox version number the netbox_utils.py script received. This script only get the major release number and not the major and minor release number.
The problem is that i don't know why this happened?