-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_nsot.yaml
86 lines (78 loc) · 2.32 KB
/
setup_nsot.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
##########
# SETUP #
##########
- name: Create a site
uri:
url: "{{ URL }}sites/"
method: POST
return_content: yes
HEADER_Content-Type: "application/json"
body:
"{{ lookup('file','site_create.json') }}"
status_code: 201
body_format: json
delegate_to: localhost
register: site
###ATTRIBUTES
- name: Create the json body to create the skey attrbs to be used in the playbook
template:
src: attribute_create.j2
dest: ./{{item}}_attr_create.json
with_items:
- Itervalue
- Network
- name : Create the Service Key attributes
#This is used to identify the values associated with a given playbook run
uri:
url: "{{ URL }}attributes/"
method: POST
return_content: yes
HEADER_Content-Type: "application/json"
body: "{{ lookup('file','{{item}}_attr_create.json') }}"
status_code: 201
body_format: json
delegate_to: localhost
with_items:
- Itervalue
- Network
###ATTRIBUTES
###SUPERNET
- name: Create the json body to create the encr_snet supernet
template:
src: supernet_create.j2
dest: ./supernet_create.json
- name: Create a sample network
uri:
url: "{{ URL }}networks/"
method: POST
return_content: yes
HEADER_Content-Type: "application/json"
body: "{{ lookup('file','supernet_create.json') }}"
status_code: 201
body_format: json
delegate_to: localhost
###SUPERNET
###ITERABLES
- name: Create the json body to create a vlan and cryptomap counter iterable
template:
src: iter_create.j2
dest: ./{{item}}_iter_create.json
with_items:
- vlan
- cryptomap
#This is used to identify the values associated with a given playbook run
- name : Create the VLAN and cryptomap counters
uri:
url: "{{ URL }}iterables/"
method: POST
return_content: yes
HEADER_Content-Type: "application/json"
body: "{{ lookup('file','{{item}}_iter_create.json') }}"
status_code: 201
body_format: json
delegate_to: localhost
with_items:
- vlan
- cryptomap
###ITERABLES