Ansible docs are generated from <ahref="https://github.com/ansible/ansible">GitHub sources</a> using <ahref="http://sphinx-doc.org/">Sphinx</a> using a theme provided by <ahref="http://readthedocs.org">Read the Docs</a>.
The Ansible ACI modules provide a user-friendly interface to managing your ACI environment using Ansible playbooks.
For instance ensuring that a specific tenant exists, is done using the following Ansible task:
For instance ensuring that a specific tenant exists, is done using the following Ansible task using module `aci_tenant <aci_tenant>`:
..code-block:: yaml
@ -67,6 +67,37 @@ For instance ensuring that a specific tenant exists, is done using the following
A complete list of existing ACI modules is available for `the latest stable release <http://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html#aci>`_ as well as `the current development version <http://docs.ansible.com/ansible/devel/modules/list_of_network_modules.html#aci>`_.
Querying ACI configuration
..........................
A module can also be used to query a specific object.
..code-block:: yaml
- name: Query tenant customer-xyz
aci_tenant:
host: my-apic-1
username: admin
password: my-password
tenant: customer-xyz
state: query
Or query all objects.
..code-block:: yaml
- name: Query all tenants
aci_tenant:
host: my-apic-1
username: admin
password: my-password
state: query
register: all_tenants
After registering the return values of the `aci_tenant <aci_tenant>` task as shown above, you can access all tenant information from variable ``all_tenants``.
Common parameters
.................
@ -125,7 +156,7 @@ Return values
The following values are always returned:
current
The resulting state of the managed object.
The resulting state of the managed object, or results of your query.
The following values are returned when ``output_level: info``:
@ -173,7 +204,7 @@ ACI authentication
Password-based authentication
.............................
If you want to logon using a username and password, you can use the following parameters with your ACI modules:
If you want to logon using a username and password, you can use the following parameters with your ACI modules:
..code-block:: yaml
@ -208,16 +239,16 @@ Configure your local user
,,,,,,,,,,,,,,,,,,,,,,,,,
Perform the following steps:
- Add the X.509 certificate to your ACI AAA local user at **ADMIN > AAA**
- Click **AAA Authentication**
- Check that in the **Authentication** field the **Realm** field displays **Local**
- Expand **Security Management > Local Users**
- Click the name of the user you want to add a certificate to, in the **User Certificates** area
- Click the **+** sign and in the **Create X509 Certificate** enter a certificate name in the **Name** field
- Add the X.509 certificate to your ACI AAA local user at :guilabel:`ADMIN` » :guilabel:`AAA`
- Click :guilabel:`AAA Authentication`
- Check that in the :guilabel:`Authentication` field the :guilabel:`Realm` field displays :guilabel:`Local`
{% if not returnfacts and returndocs and returndocs.ansible_facts is defined %}
{% set returnfacts = returndocs.ansible_facts.contains %}
{% set _x = returndocs.pop('ansible_facts', None) %}
{% endif %}
Return Values
-------------
{% if returnfacts -%}
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this @{ plugin_type }@:
Returned Facts
--------------
Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
{% set support = { 'core': 'The Ansible Core Team', 'network': 'The Ansible Network Team', 'certified': 'an Ansible Partner', 'community': 'The Ansible Community', 'curated': 'A Third Party'} %}
{% set module_states = { 'preview': 'it is not guaranteed to have a backwards compatible interface', 'stableinterface': 'the maintainers for this module guarantee that no backward incompatible interface changes will be made'} %}
{% if metadata %}
{% if metadata.status %}
Status
~~~~~~
{% for cur_state in metadata.status %}
This module is flagged as **@{cur_state}@** which means that @{module_states[cur_state]}@.
{% endfor %}
{% endif %}
{% if metadata.supported_by in ('core', 'network') %}
{% if metadata.supported_by in ('core', 'network') %}
Maintenance Info
~~~~~~~~~~~~~~~~
Support
~~~~~~~
For more information about Red Hat's support of this @{ plugin_type }@,
please refer to this `Knowledge Base article <https://access.redhat.com/articles/rhel-top-support-policies/>`_
{% endif %}
{% endif %}
{% else %}
This module is flagged as **deprecated** and will be removed in version { deprecated['removed_in'] | default('') | string | convert_symbols_to_format }@. For more information see :ref:`DEPRECATED`.
{% endif %}
{% if author is defined -%}
Author
~~~~~~
{% for author_name in author %}
- @{ author_name }@
{% endfor %}
{% endif %}
If you notice any issues in this documentation you can `edit this document <https://github.com/ansible/ansible/edit/devel/lib/ansible/modules/@{ source }@?description=%3C!---%20Your%20description%20here%20--%3E%0A%0A+label:%20docsite_pr>`_ to improve it.
.. hint::
If you notice any issues in this documentation you can `edit this document <https://github.com/ansible/ansible/edit/devel/lib/ansible/modules/@{ source }@?description=%3C!---%20Your%20description%20here%20--%3E%0A%0A+label:%20docsite_pr>`_ to improve it.