Note
This inventory plugin is part of the cisco.aci collection (version 2.12.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cisco.aci.
To use it in a playbook, specify: cisco.aci.aci_inventory_system.
Parameter | Comments |
|---|---|
certificate_name aliases: cert_name string | The X.509 certificate name attached to the APIC AAA user used for signature-based authentication. If a If PEM-formatted content was provided for If the value is not specified in the task, the value of environment variable |
compose dictionary | Create vars from jinja2 expressions. Default: |
groups dictionary | Add hosts to group based on Jinja2 conditionals. Default: |
host aliases: hostname string | IP Address or hostname of APIC resolvable by Ansible control host. If the value is not specified in the task, the value of environment variable |
keyed_groups list / elements=dictionary | Add hosts to group based on the values of a variable. Default: |
|
default_value string added in ansible-core 2.12 |
The default value when the host variable’s value is an empty string. This option is mutually exclusive with |
|
key string |
The key from input dictionary used to generate groups. |
|
parent_group string |
parent group for keyed group. |
|
prefix string |
A keyed group name will start with this prefix. Default: |
|
separator string |
separator used to build the keyed group name. Default: |
|
trailing_separator boolean added in ansible-core 2.12 |
Set this option to This option is mutually exclusive with Choices:
|
leading_separator boolean added in ansible-core 2.11 | Use in conjunction with By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is Set this option to If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. Choices:
|
output_level string | Influence the output of this ACI module.
If the value is not specified in the task, the value of environment variable Choices:
|
output_path string | Path to a file that will be used to dump the ACI JSON configuration objects generated by the module. If the value is not specified in the task, the value of environment variable |
password string | The password to use for authentication. This option is mutual exclusive with If the value is not specified in the task, the value of environment variables |
port integer | Port number to be used for REST connection. The default value depends on parameter If the value is not specified in the task, the value of environment variable |
private_key aliases: cert_key string | Either a PEM-formatted private key file or the private key content used for signature-based authentication. This value also influences the default This option is mutual exclusive with If the value is not specified in the task, the value of environment variable |
strict boolean | If Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. Choices:
|
suppress_previous aliases: no_previous, ignore_previous boolean | If If the value is not specified in the task, the value of environment variable The default value is WARNING - This causes the previous return value to be empty. The previous state of the object will not be checked and the POST update will contain all properties. Choices:
|
suppress_verification aliases: no_verification, no_verify, suppress_verify, ignore_verify, ignore_verification boolean | If If the value is not specified in the task, the value of environment variable The default value is WARNING - This causes the current return value to be set to the proposed value. The current object including default values will be unverifiable in a single task. Choices:
|
timeout integer | The socket level timeout in seconds. If the value is not specified in the task, the value of environment variable The default value is 30. |
use_extra_vars boolean added in ansible-core 2.11 | Merge extra vars into the available variables for composition (highest precedence). Choices:
Configuration:
|
use_proxy boolean | If If the value is not specified in the task, the value of environment variable The default value is true. Choices:
|
use_ssl boolean | If If the value is not specified in the task, the value of environment variable The default value is true when the connection is local. Choices:
|
username aliases: user string | The username to use for authentication. If the value is not specified in the task, the value of environment variables The default value is admin. |
validate_certs boolean | If This should only set to If the value is not specified in the task, the value of environment variable The default value is true. Choices:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
See also
Detailed information on how to manage your ACI infrastructure using Ansible.
Detailed guide on how to write your own Cisco ACI modules to contribute.
---
# Generate dynamic inventory of every device
plugin: cisco.aci.aci_inventory_system
host: 192.168.1.90
username: admin
password: PASSWORD
validate_certs: false
# (Optional) Generate inventory and put devices into groups based on role: spine, leaf, controller
keyed_groups:
- prefix: role
key: role
# (Optional) Generate inventory and use the compose variables to define how we want to connect
compose:
ansible_connection: "'ansible.netcommon.httpapi'"
ansible_network_os: "'cisco.aci.aci'"
ansible_host: "'192.168.1.90'"
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/aci/aci_inventory_system_inventory.html