Skip to content

Instantly share code, notes, and snippets.

@liamkeegan
Created November 9, 2021 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liamkeegan/4f7ce0fcec555516ac3f582b274dadd1 to your computer and use it in GitHub Desktop.
Save liamkeegan/4f7ce0fcec555516ac3f582b274dadd1 to your computer and use it in GitHub Desktop.
YAML Anchor Example
- name: APIC - Fabric and tenant setup
hosts: all
gather_facts: no
vars:
aci_login: &aci_login
hostname: '{{ apic_host }}'
username: '{{ apic_username }}'
password: '{{ apic_password }}'
use_proxy: '{{ apic_use_proxy }}'
validate_certs: '{{ apic_validate_certs }}'
tasks:
- name: Add a new production tenant
aci_tenant:
<<: *aci_login
tenant: "{{ dc.siteCode }}_Prod"
state: present
delegate_to: localhost
- name: Create physical domain
aci_domain:
<<: *aci_login
domain: "{{ dc.siteCode }}_Prod_Phys_Dom"
domain_type: phys
state: present
delegate_to: localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment