From cd18c6e75bcca8115796986405af41483d205ba3 Mon Sep 17 00:00:00 2001 From: alex-local Date: Sun, 7 Sep 2025 20:27:08 +0200 Subject: [PATCH] awx-local-setup: add NetBox inventory plugin YAML for SCM inventory source --- inventory/netbox_inventory.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 inventory/netbox_inventory.yml diff --git a/inventory/netbox_inventory.yml b/inventory/netbox_inventory.yml new file mode 100644 index 0000000..7394be1 --- /dev/null +++ b/inventory/netbox_inventory.yml @@ -0,0 +1,24 @@ +--- +# NetBox Ansible inventory plugin for AWX. +# +# This file is intended to live in the AWX Project (git) and be referenced +# by an SCM inventory source via `source_path: inventory/netbox_inventory.yml`. +# +# The actual NetBox API token and URL should be supplied via the AWX +# inventory source `source_vars` (so secrets are not committed to git). + +plugin: netbox.netbox.inventory +# The plugin expects at least `url` and `token` keys; we leave placeholders +# here and provide them via the AWX inventory source `source_vars`. +url: "__NETBOX_API_URL__" +token: "__NETBOX_TOKEN__" +validate_certs: true + +# Optional example filters and grouping. Tune these as needed in your +# environment; AWX will load the plugin and use the `source_vars` values +# provided on the inventory source. +filters: {} +group_by: + - site + +# end of file