blob: 3095a3edcf026d06d45cf8f6ca5ba3a801e81374 (
plain)
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
87
88
89
90
91
|
---
- name: Interface Operations
hosts: localhost
connection: local
gather_facts: false
vars:
unispherehost: '10.*.*.*'
validate_certs: false
username: 'user'
password: '**'
tasks:
- name: Add Interface as Backup to NAS Server
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
role: "BACKUP"
interface_ip: "xx.xx.xx.xx"
netmask: "xx.xx.xx.xx"
gateway: "xx.xx.xx.xx"
vlan_id: 324
state: "present"
- name: Add Interface as Backup to NAS Server - Idempotency
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
role: "BACKUP"
interface_ip: "xx.xx.xx.xx"
netmask: "xx.xx.xx.xx"
gateway: "xx.xx.xx.xx"
vlan_id: 324
state: "present"
- name: Get Interface details
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
interface_ip: "xx.xx.xx.xx"
state: "present"
- name: Add Interface as Production to NAS Server
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
role: "PRODUCTION"
interface_ip: "xx.xx.xx.xx"
netmask: "xx.xx.xx.xx"
gateway: "xx.xx.xx.xx"
vlan_id: 324
state: "present"
- name: Add Interface as Production to NAS Server - Idempotency
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
role: "PRODUCTION"
interface_ip: "xx.xx.xx.xx"
netmask: "xx.xx.xx.xx"
gateway: "xx.xx.xx.xx"
vlan_id: 324
state: "present"
- name: Delete Interface
dellemc.unity.interface:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
nas_server_name: "dummy_nas"
interface_ip: "xx.xx.xx.xx"
state: "absent"
|