-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathsvm_secondary_create.yaml
More file actions
153 lines (137 loc) · 4.89 KB
/
Copy pathsvm_secondary_create.yaml
File metadata and controls
153 lines (137 loc) · 4.89 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
- hosts: localhost
collections:
- netapp.ontap
vars:
ontap_parameters: &ontap_parameters
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
https: true
validate_certs: false
name: Secondary SVM Creation
tasks:
- name: Create SVM
netapp.ontap.na_ontap_svm:
state: present
name: "svm_secondary"
allowed_protocols: nfs,iscsi
aggr_list: "aggr1,aggr2"
<<: *ontap_parameters
- name: Create Specific User
netapp.ontap.na_ontap_user:
state: present
name: trident
applications: ontapi,http
authentication_method: password
set_password: Netapp1!
lock_user: False
role_name: vsadmin
vserver: svm_secondary
<<: *ontap_parameters
- name: Enable NFS
netapp.ontap.na_ontap_nfs:
state: present
service_state: started
vserver: svm_secondary
nfsv3: enabled
nfsv4: enabled
nfsv41: enabled
<<: *ontap_parameters
- name: Create ExportPolicyRule for the default policy
netapp.ontap.na_ontap_export_policy_rule:
state: present
policy_name: default
vserver: svm_secondary
rule_index: 1
client_match: 192.168.0.0/24
ro_rule: any
rw_rule: any
protocol: any
super_user_security: any
allow_suid: true
<<: *ontap_parameters
- name: Enable iSCSI
netapp.ontap.na_ontap_iscsi:
state: present
service_state: started
vserver: svm_secondary
<<: *ontap_parameters
- name: Create Service Policy for Management (Core)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'create', '-policy', 'secondary_management', '-vserver', 'svm_secondary', '-allowed-addresses', '192.168.0.60/24', '-service', 'data-core']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Service Policy for Management (HTTPS)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'add-service', '-policy', 'secondary_management', '-vserver', 'svm_secondary', '-allowed-addresses', '192.168.0.60/24', '-service', 'management-https']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Service Policy for NFS (Core)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'create', '-policy', 'secondary_nfs', '-vserver', 'svm_secondary', '-allowed-addresses', '0.0.0.0/0', '-service', 'data-core']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Service Policy for NFS (Data)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'add-service', '-policy', 'secondary_nfs', '-vserver', 'svm_secondary', '-allowed-addresses', '0.0.0.0/0', '-service', 'data-nfs']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Service Policy for iSCSI (Core)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'create', '-policy', 'secondary_iscsi', '-vserver', 'svm_secondary', '-allowed-addresses', '0.0.0.0/0', '-service', 'data-core']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Service Policy for iSCSI (Data)
netapp.ontap.na_ontap_command:
command: ['network', 'interface', 'service-policy', 'add-service', '-policy', 'secondary_iscsi', '-vserver', 'svm_secondary', '-allowed-addresses', '0.0.0.0/0', '-service', 'data-iscsi']
privilege: "advanced"
<<: *ontap_parameters
- name: Create Mgmt Interface
netapp.ontap.na_ontap_interface:
state: present
interface_name: secondary_mgmt
home_port: e0c
home_node: cluster1-01
admin_status: up
service_policy: secondary_management
address: 192.168.0.140
netmask: 255.255.255.0
vserver: svm_secondary
<<: *ontap_parameters
- name: Create NFS Interface
netapp.ontap.na_ontap_interface:
state: present
interface_name: secondary_nfs
home_port: e0d
home_node: cluster1-01
admin_status: up
service_policy: secondary_nfs
address: 192.168.0.141
netmask: 255.255.255.0
vserver: svm_secondary
<<: *ontap_parameters
- name: Create iSCSI Interface#1
netapp.ontap.na_ontap_interface:
state: present
interface_name: secondary_iscsi_001
home_port: e0c
home_node: cluster1-01
admin_status: up
service_policy: secondary_iscsi
address: 192.168.0.142
netmask: 255.255.255.0
vserver: svm_secondary
<<: *ontap_parameters
- name: Create iSCSI Interface#2
netapp.ontap.na_ontap_interface:
state: present
interface_name: secondary_iscsi_002
home_port: e0d
home_node: cluster1-01
admin_status: up
service_policy: secondary_iscsi
address: 192.168.0.143
netmask: 255.255.255.0
vserver: svm_secondary
<<: *ontap_parameters