> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Dynamic device inventory

> An overview of dynamic inventory and the Ansible plugins available for building device inventory from a source of truth system in Itential Gateway.

Dynamic inventory is the process of building the Ansible device inventory by programmatically querying a source of truth (SoT) system for all devices. Because the inventory is generated directly from the SoT, it always reflects the current state of your network, can be refreshed easily, and eliminates the need to maintain a static inventory file manually. The Ansible plugin you configure is responsible for generating the inventory and for any filtering or advanced querying capabilities.

Gateway supports dynamic inventory through a variety of Ansible plugins available from the Ansible and open source communities. The following plugins are covered in this documentation:

* [ServiceNow](/itential-gateway/4/servicenow-dynamic-inventory)
* [Nautobot](/itential-gateway/4/nautobot-dynamic-inventory)
* [NetBox](/itential-gateway/4/netbox-dynamic-inventory)
* [SolarWinds](/itential-gateway/4/solarwinds-dynamic-inventory)
* [ZPE Cloud](/itential-gateway/4/zpe-cloud-dynamic-inventory)

## General workflow

While the configuration details vary by plugin, setting up dynamic inventory in Gateway follows the same general pattern for most plugins.

#### Install the plugin

Use `ansible-galaxy` to install the Ansible collection for your SoT system into Gateway.

#### Configure Ansible to use the plugin

Update `/etc/ansible/ansible.cfg` to enable the plugin and set any required defaults such as `interpreter_python`, `collections_path`, and `INVENTORY_ENABLED`.

#### Configure the host file

Create an inventory file in the Gateway inventory directory (typically `/opt/automation-gateway/ansible/inventory/`) and configure it to connect to and query your SoT system.

#### Confirm the plugin is working

Test the plugin directly from the command line before invoking it from Gateway:

```bash
ansible-inventory -vvv --list -i <path-to-plugin-host-file>
```

When executed correctly, this command returns a list of devices from your SoT system with their associated variables.

#### Restart Gateway

Restart Gateway to trigger the plugin to execute and populate the Ansible inventory:

```bash
sudo systemctl restart automation-gateway
```

> **Note**
>
> Some plugins require additional steps beyond this general workflow — for example, installing multiple collections, configuring a connection plugin, or setting up SSH keys. Refer to the plugin-specific documentation for details.