> 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.

# Configure Ansible

> Covers inventory files and paths for Ansible configuration in Itential Gateway.

This article covers the inventory files and paths for Ansible configuration. For additional detail and information, see the official [Ansible Configuration](https://docs.ansible.com/ansible/latest/reference_appendices/config.html?highlight=ansible%20configuration%20file) reference guide.

## Inventory modes

Before configuring Itential Gateway, determine which inventory mode you require. For existing Ansible users, specify your inventory file in the `inventory_file` property to maintain all existing device variables and groups as used within your current Ansible® environment. Gateway considers this mode **external inventory**. Conversely, **internal inventory** (i.e., an empty `inventory_file` property) allows manipulation of inventory information and management of your inventory (including management of inventory variables) via Gateway.

One important factor used to determine which mode to run Gateway in depends on the desired mechanism for managing inventory:

* **Internal** - Management via Gateway API.
* **External** - Management via manipulation of an inventory file, as with any Ansible installation.

Consider each approach, the inventory mode you desire, and choose accordingly.

> **Info**
>
> Any valid Ansible inventory file is compatible with Gateway. For more information about authoring Ansible inventory files, see the [Ansible documentation](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html).

## Ansible module search paths

By default, Gateway uses information from the `ansible --version` command to determine the path to search for Ansible network modules. A recursive search of the path is performed at startup time as part of the module discovery process. If for some reason this path is incorrect, the `module_path` parameter can be configured to `override` the default Ansible module search path. This allows you to configure a superset or a subset of the Ansible directories to be searched. The default `module_path` configures a superset (all possible network modules). To trim down the overall number of network modules that will be discovered, you may provide a list of more finely tuned paths instead. Note that a recursive search will be performed on all paths.

Support for module search paths outside of the Ansible release directory structure is also available by updating the Ansible configuration settings. This is done by editing the `ansible.cfg` configuration file. Add the `library` key to the `[defaults]` section of the `ansible.cfg` file to expand the list of directories Gateway will search for in addition to the network modules found in the Ansible release directory.

```ini
[defaults]
library = /path/to/ansible/modules1:/path/to/ansible/modules2
```