1.3 KiB
Custom AWX Execution Environment: NetBox support
This folder contains a minimal Dockerfile and helper to create an AWX Execution Environment that includes the NetBox Ansible collection and pynetbox.
Files:
- Dockerfile - derived from quay.io/ansible/awx-ee:latest, installs pynetbox and netbox.netbox
- build-and-load-ee.sh - builds the image and loads it into Minikube
Usage:
-
Build and load into minikube:
IMAGE_NAME=local/awx-ee-netbox:latest ./awx-local-setup/ee/build-and-load-ee.sh
-
Register this Execution Environment in AWX (UI or awx-cli / API). Use the image name you built (local/awx-ee-netbox:latest) as the Execution Environment image.
-
Commit an inventory plugin file (example: inventory/netbox_inventory.yml) to your project repository that uses the netbox.netbox.inventory plugin and references the NetBox token and URL.
-
Create an AWX inventory source of type
scmpointing to the project and setsource_pathto the plugin file created in step 3. Ensure the inventory source uses the custom Execution Environment.
Notes:
- If your Minikube cluster uses a remote container runtime you may need to push the built image to a registry reachable by the cluster and set IMAGE_NAME accordingly.
- For production, build and push to a private registry and configure AWX to pull the image using pull secrets.