R12.1-JA-2025June05

Inventory Template (SDN Host Group)

Example: Inventory Template (SDN Host Group)

Replace the highlighted content with the specific parameters to customize your template.

---
global_variables: 
    ansible_connection: local
host_groups:
    - name: CISCO_ACI # to be manually modified by user
      group_variables:
       descr: "Group CISCO ACI"
      hosts: # use NetworkBrain Intellisense Variables here to define SDN controllers as hosts
       - $sdn_controller.APIC_1
       - $sdn_controller.APIC_2
      host_variables:
       username: $credential.username
       password: $credential.password

The following table lists the description of the main parameters.

ParameterDescription
global_variables

The variables of Ansible default group “all”, which will be applied to all hosts.

Note: Global variables should be constants. NetworkBrain Intellisense Variables are not supported.

name

The name of the host group, which is auto-generated and defined from UI. See Define a Legacy Host Group for more details.

Note: Any unspecified host groups will be assigned to the default Ansible host group ungrouped.

group_variables

The variables of the host group. See Ansible group variables for more information.

Note: Global variables should be constants. NetworkBrain Intellisense Variables are not supported.

hosts

The name of SDN Controller.

Note: Make sure to add a leading hyphen ‘-‘ when defining each host, as it indicates the following data structure is an array/list in YAML syntax.

host_variables

The variables of the host. See Ansible host variables for more information.

Note: Values of host variables need to match the host's GDR properties or interfaces.

Note: ‘$’ can be used to trigger NetworkBrain Intellisense Variables.

Example: Inventory Instance (SDN Host Group)

To suit your specific project needs, you can modify the existing or add new key/value pair(s) in the inventory instance. All sensitive data in the Inventory Instance is encrypted.

Information Note: Make sure to replace the entire string when modifying the encrypted string *value_encrypted_donot_change*.

[CISCO_ACI]
192.168.48.211 username=admin password=*value_encrypted_donot_change* 
192.168.48.135 username=root password=*value_encrypted_donot_change* 
[CISCO_ACI:vars]
descr="Group CISCO ACI"