-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbp.yml
64 lines (61 loc) · 1.64 KB
/
bp.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
# Demo using the ACI REST module
- name: Configuration using aci_rest
hosts: apic1
connection: local
gather_facts: no
tasks:
- name: Set COOP Policy to strict
aci_rest:
hostname: "{{ inventory_hostname }}"
username: ansible
private_key: ansible.key
path: /api/node/mo/uni/fabric/pol-default.json
method: post
content: |
{
"coopPol": {
"attributes":{
"type":"strict",
"dn":"uni/fabric/pol-default"
}
}
}
validate_certs: no
- name: Enforce Subnet Check
aci_rest:
hostname: "{{ inventory_hostname }}"
username: ansible
private_key: ansible.key
path: /api/node/mo/uni/infra/settings.json
method: post
content: |
{
"infraSetPol": {
"attributes": {
"enforceSubnetCheck":"true",
"dn":"uni/infra/settings"
}
}
}
validate_certs: no
- name: Endpoint Loop Protection
aci_rest:
hostname: "{{ inventory_hostname }}"
username: ansible
private_key: ansible.key
path: /api/node/mo/uni/infra/epLoopProtectP-default.json
method: post
content: |
{
"epLoopProtectP": {
"attributes": {
"action": "",
"adminSt": "enabled",
"loopDetectIntvl": "60",
"loopDetectMult": "4",
"dn":"uni/infra/epLoopProtectP-default"
}
}
}
validate_certs: no