AWX 19 & Netbox 3.1 integration

136 views
Skip to first unread message

alber...@gmail.com

unread,
Dec 24, 2021, 4:32:00 AM12/24/21
to AWX Project
Happy holiday to all,

I am trying to integrate AWX v19 & Netbox v3.1 but having trouble to execute playbooks

I have a remote-host inventory item created which has remote host information
Screenshot 2021-12-24 092333.png

My project is created & synced with git
I have a template created as below

Screenshot 2021-12-24 092611.png

My remote host has the recommended Ansible version, Python3 version, pynetbox & netbox collections installed.
When I launch the template i get the following error & am not sure what I have missed.

Screenshot 2021-12-24 092902.png

My playbook which calls a role is detailed below:


---

- name: Create/Remove region within Netbox with only required information
  netbox.netbox.netbox_region:
    netbox_url: "{{netbox_url}}"
    netbox_token: "{{netbox_token}}"
    validate_certs: no
    data:
      name: "{{item.name}}"
    state: "{{item.state}}"
  loop: "{{region}}"
  when:
    - item.name != ""
    - item.state == "present" or item.state == "absent"
  tags:
    - region

...


Have I missed something in my AWX setup, can I run this from a remote host?

Any help this side of Xmas would be great :)

Regards

Andrew C

unread,
Dec 27, 2021, 2:18:42 AM12/27/21
to AWX Project
Hi,

In the screenshot above you have spelt CONNECTION wrongly and since it is connection: local it will have a big impact I think.

Regards,
Andrew

alber...@gmail.com

unread,
Jan 4, 2022, 6:45:10 AM1/4/22
to AWX Project
Fixed that but still getting the same output error message as before

Tchello Mello

unread,
Jan 5, 2022, 3:37:34 PM1/5/22
to AWX Project
Hello, 

   Usually this error is related to issues when trying to find the Ansible collection. 

   As explained on the page https://docs.ansible.com/ansible/latest/collections/netbox/netbox/netbox_region_module.html#ansible-collections-netbox-netbox-netbox-region-module, do you see the collection installed when running `ansible-galaxy collection list`

   You can also find more information about how to use collections at https://docs.ansible.com/ansible/latest/user_guide/collections_using.html

 Best Regards,
mmello
Reply all
Reply to author
Forward
0 new messages