i'm trying to run playbook which connects with Netbox. But getting error following error..
- name: "Test NetBox prefix module"
connection: local
hosts: localhost
collections:
- netbox.netbox
tasks:
- name: vars
include_vars:
dir: vars
- name: Create prefix within NetBox
netbox_prefix:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
data:
parent: x.x.0.0/16
prefix_length: 30
state: present
first_available: yes
i'm getting following error:
FAILED! => {"changed": false, "msg": "Failed to establish connection to NetBox API"}
please do helpful....