forked from vmware-archive/nsxansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_macset.yml
52 lines (49 loc) · 1.51 KB
/
test_macset.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
---
- hosts: localhost
connection: local
gather_facts: False
vars_files:
- answerfile_new_nsxman.yml
tasks:
- name: "TEST ~ Create a new MACset (EXPECT changed=true)"
nsx_macset:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
transportzone: "globalroot-0"
description: "My MACset"
name: "TestMS"
value: "00:11:44:11:44:00"
register: create_macset
- name: Check MACset create response
debug: var=create_macset
- name: "TEST ~ Update the MACset (EXPECT changed=true)"
nsx_macset:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
transportzone: "globalroot-0"
description: "My MACset is way cooler now"
name: "TestMS"
value: "11:11:11:11:11:11"
register: update_macset
- name: Check MACset update response
debug: var=update_macset
- name: "TEST ~ Update the MACset (EXPECT changed=false)"
nsx_macset:
nsxmanager_spec: "{{ nsxmanager_spec }}"
state: present
transportzone: "globalroot-0"
description: "My MACset is way cooler now"
name: "TestMS"
value: "11:11:11:11:11:11"
register: update_macset_again
- name: Check MACset update response
debug: var=update_macset_again
- name: "TEST ~ Delete the MACset (EXPECT changed=true)"
nsx_macset:
nsxmanager_spec: "{{ nsxmanager_spec }}"
transportzone: "globalroot-0"
name: "TestMS"
state: absent
register: delete_macset
- name: Check MACset delete response
debug: var=delete_macset