-
Notifications
You must be signed in to change notification settings - Fork 16
/
aci-demo.yml
39 lines (31 loc) · 1.51 KB
/
aci-demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: playbook for aci testing
hosts: apic
connection: local
gather_facts: no
vars:
filter1:
- arp
tasks:
- name: ensure tenant exists
aci_tenant: name=customer_1 descr='tenant by Ansible' state=present host={{ inventory_hostname }} username={{ user }} password={{ pass }}
- name: ensure context for tenant exists (private network)
aci_context: name=c1_priv_network descr='customer 1 VRF' tenant=customer_1 state=present host={{ inventory_hostname }} username={{ user }} password={{ pass }}
- name: ensure bridge domain exists
aci_bridge_domain: name=c1bd1 context=c1_priv_network subnet=10.1.100.1/24 descr='web servers' tenant=customer_1 state=present host={{ inventory_hostname }} username={{ user }} password={{ pass }}
- name: ensure contract exists
aci_contract: name=web-contract descr='web contracy by ansible' tenant=customer_1 state=present host={{ inventory_hostname }} username={{ user }} password={{ pass }}
# currently using the built-in common/arp filter
# for this demo - the filter ansible module
# is still in development, so if you want to test filters
# not in the common tenant, configure them manually first
- name: ensure subject exists
aci_contract_subject:
name: web-subject
contract: web-contract
filters: "{{ filter1 }}"
tenant: customer_1
state: present
host: "{{ inventory_hostname }}"
apply_both_directions: true
descr: 'subj description'