awx.awx.controller inventory – Ansible dynamic inventory plugin for the Automation Platform Controller.
This inventory plugin is part of the awx.awx collection (version 23.6.0).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install awx.awx.
To use it in a playbook, specify:
Reads inventories from the Automation Platform Controller.
Supports reading configuration from both YAML config file and environment variables.
If reading from the YAML file, the file name must end with controller.(yml|yaml) or controller_inventory.(yml|yaml), the path in the command would be /path/to/controller_inventory.(yml|yaml). If some arguments in the config file are missing, this plugin will try to fill in missing arguments by reading from environment variables.
If reading configurations from environment variables, the path in the command must be @controller_inventory.
Make extra requests to provide all group vars with metadata about the source host.
The ID of the inventory that you wish to import.
This is allowed to be either the inventory primary key or its named URL slug.
Primary key values will be accepted as strings or integers, and URL slugs must be strings.
Named URL slugs follow the syntax of “inventory_name++organization_name”.
Specify the timeout Ansible should use in requests to the controller host.
Defaults to 10 seconds
This will not work with the export or import modules.
Specify whether Ansible should verify the SSL certificate of the controller host.
Defaults to True, but this is handled by the shared module_utils code
If no config_file is provided we will attempt to use the tower-cli library defaults to find your host information.
config_file should be in the following format host=hostname username=username password=password
# Before you execute the following commands, you should make sure this file is in your plugin path,
# and you enabled this plugin.
# Example for using controller_inventory.yml file
# Then you can run the following command.
# If some of the arguments are missing, Ansible will attempt to read them from environment variables.
# ansible-inventory -i /path/to/controller_inventory.yml --list
# Example for reading from environment variables:
# Set environment variables:
# export CONTROLLER_HOST=YOUR_AUTOMATION_PLATFORM_CONTROLLER_HOST_ADDRESS
# export CONTROLLER_USERNAME=YOUR_CONTROLLER_USERNAME
# export CONTROLLER_PASSWORD=YOUR_CONTROLLER_PASSWORD
# export CONTROLLER_INVENTORY=THE_ID_OF_TARGETED_INVENTORY
# Read the inventory specified in CONTROLLER_INVENTORY from the controller, and list them.
# The inventory path must always be @controller_inventory if you are reading all settings from environment variables.
# ansible-inventory -i @controller_inventory --list