Ansible Configuration
  • 21 Mar 2024
  • Dark
    Light
  • PDF

Ansible Configuration

  • Dark
    Light
  • PDF

Article summary

This article covers the inventory files and paths for Ansible configuration. For additional detail and information, see the official Ansible Configuration reference guide.

Inventory Modes

Before configuring Itential Automation 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. Automation Gateway (AG) 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 Automation Gateway.

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

  • Internal - Management via Automation 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.

Management via External Inventory Files

Any valid Ansible inventory file is compatible with IAG. For more information about authoring Ansible inventory files, see the Ansible documentation.

Ansible Module Search Paths

By default, Automation 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 users 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). In order to trim down the overall number of network modules that will be discovered, one 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. Simply add the library key to the [defaults] section of the ansible.cfg file to expand the list of directories Automation Gateway will search for in addition to the network modules found in the Ansible release directory.

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

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.