-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathzoning_zone.yml
101 lines (92 loc) · 2.26 KB
/
zoning_zone.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
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
92
93
94
95
96
97
98
99
100
101
---
# Copyright 2019 Broadcom. All rights reserved.
# The term 'Broadcom' refers to Broadcom Inc. and/or its subsidiaries.
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- hosts: san_eng_zone_seed_san_a
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: "{{fos_user_name}}"
fos_password: "{{fos_password}}"
https: "{{fos_https}}"
aliases:
- name: Host1
members:
- aa:11:11:11:11:11:11:11
- aa:22:22:22:22:22:22:22
- name: Target2
members:
- aa:44:44:44:44:44:44:44
- name: Target3
members:
- aa:55:55:55:55:55:55:55
- name: Target4
members:
- aa:bb:cc:dd:AA:BB:CC:DD
aliases_to_delete:
- name: Target3
- name: Target4
zones:
- name: Zone1
members:
- Host1
- Target2
- Target3
- name: Zone2
members:
- Host1
- Target3
- Target4
- name: Zone3
members:
- aa:44:44:44:44:44:44:44
- aa:55:55:55:55:55:55:55
principal_members:
- aa:aa:aa:aa:bb:bb:bb:bb
- aa:aa:aa:aa:cc:cc:cc:cc
zones_to_delete:
- name: Zone2
- name: Zone3
cfgs:
- name: cfg1
members:
- Zone1
- Zone2
- name: cfg2
members:
- Zone2
- zone3
- name: cfg3
members:
- Zone1
- Zone3
cfgs_to_delete:
- name: cfg2
- name: cfg3
tasks:
- name: Create aliases
brocade_zoning_alias:
credential: "{{credential}}"
vfid: -1
aliases: "{{aliases}}"
# aliases_to_delete: "{{aliases_to_delete}}"
- name: Create zones
brocade_zoning_zone:
credential: "{{credential}}"
vfid: -1
zones: "{{zones}}"
# zones_to_delete: "{{zones_to_delete}}"
- name: Create cfgs
brocade_zoning_cfg:
credential: "{{credential}}"
vfid: -1
cfgs: "{{cfgs}}"
# cfgs_to_delete: "{{cfgs_to_delete}}"
active_cfg: cfg1
- name: Default zoning
brocade_zoning_default_zone:
credential: "{{credential}}"
vfid: -1
default_zone_access: allaccess