summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/unity/docs/modules/cifsserver.rst
blob: 2c3c9286e2936e422e68481149c955141330b70c (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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
.. _cifsserver_module:


cifsserver -- Manage CIFS server on Unity storage system
========================================================

.. contents::
   :local:
   :depth: 1


Synopsis
--------

Managing the CIFS server on the Unity storage system includes creating CIFS server, getting CIFS server details and deleting CIFS server.



Requirements
------------
The below requirements are needed on the host that executes this module.

- A Dell Unity Storage device version 5.1 or later.
- Ansible-core 2.13 or later.
- Python 3.9, 3.10 or 3.11.
- Storops Python SDK 1.2.11.



Parameters
----------

  nas_server_name (optional, str, None)
    Name of the NAS server on which CIFS server will be hosted.


  nas_server_id (optional, str, None)
    ID of the NAS server on which CIFS server will be hosted.


  netbios_name (optional, str, None)
    The computer name of the SMB server in Windows network.


  workgroup (optional, str, None)
    Standalone SMB server workgroup.


  local_password (optional, str, None)
    Standalone SMB server administrator password.


  domain (optional, str, None)
    The domain name where the SMB server is registered in Active Directory.


  domain_username (optional, str, None)
    Active Directory domain user name.


  domain_password (optional, str, None)
    Active Directory domain password.


  cifs_server_name (optional, str, None)
    The name of the CIFS server.


  cifs_server_id (optional, str, None)
    The ID of the CIFS server.


  interfaces (optional, list, None)
    List of file IP interfaces that service CIFS protocol of SMB server.


  unjoin_cifs_server_account (optional, bool, None)
    Keep SMB server account unjoined in Active Directory after deletion.

    ``false`` specifies keep SMB server account joined after deletion.

    ``true`` specifies unjoin SMB server account from Active Directory before deletion.


  state (True, str, None)
    Define whether the CIFS server should exist or not.


  unispherehost (True, str, None)
    IP or FQDN of the Unity management server.


  username (True, str, None)
    The username of the Unity management server.


  password (True, str, None)
    The password of the Unity management server.


  validate_certs (optional, bool, True)
    Boolean variable to specify whether or not to validate SSL certificate.

    ``true`` - Indicates that the SSL certificate should be verified.

    ``false`` - Indicates that the SSL certificate should not be verified.


  port (optional, int, 443)
    Port number through which communication happens with Unity management server.





Notes
-----

.. note::
   - The *check_mode* is supported.
   - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.




Examples
--------

.. code-block:: yaml+jinja

    
    - name: Create CIFS server belonging to Active Directory
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        nas_server_name: "test_nas1"
        cifs_server_name: "test_cifs"
        domain: "ad_domain"
        domain_username: "domain_username"
        domain_password: "domain_password"
        state: "present"

    - name: Get CIFS server details using CIFS server ID
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        cifs_server_id: "cifs_37"
        state: "present"

    - name: Get CIFS server details using NAS server name
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        nas_server_name: "test_nas1"
        state: "present"

    - name: Delete CIFS server
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        cifs_server_id: "cifs_37"
        unjoin_cifs_server_account: True
        domain_username: "domain_username"
        domain_password: "domain_password"
        state: "absent"

    - name: Create standalone CIFS server
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        netbios_name: "ANSIBLE_CIFS"
        workgroup: "ansible"
        local_password: "Password123!"
        nas_server_name: "test_nas1"
        state: "present"

    - name: Get CIFS server details using netbios name
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        netbios_name: "ANSIBLE_CIFS"
        state: "present"

    - name: Delete standalone CIFS server
      dellemc.unity.cifsserver:
        unispherehost: "{{unispherehost}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: "{{validate_certs}}"
        cifs_server_id: "cifs_40"
        state: "absent"



Return Values
-------------

changed (always, bool, True)
  Whether or not the resource has changed.


cifs_server_details (When CIFS server exists, dict, {'description': None, 'domain': 'xxx.xxx.xxx.com', 'existed': True, 'file_interfaces': {'UnityFileInterfaceList': [{'UnityFileInterface': {'hash': -9223363258905013637, 'id': 'if_43'}}]}, 'hash': -9223363258905010379, 'health': {'UnityHealth': {'hash': 8777949765559}}, 'id': 'cifs_40', 'is_standalone': False, 'last_used_organizational_unit': 'ou=Computers,ou=Dell NAS servers', 'name': 'ansible_cifs', 'nas_server': {'UnityNasServer': {'hash': 8777949765531, 'id': 'nas_18'}}, 'netbios_name': 'ANSIBLE_CIFS', 'smb_multi_channel_supported': True, 'smb_protocol_versions': ['1.0', '2.0', '2.1', '3.0'], 'smbca_supported': True, 'workgroup': None})
  Details of the CIFS server.


  id (, str, )
    Unique identifier of the CIFS server instance.


  name (, str, )
    User-specified name for the SMB server.


  netbios_name (, str, )
    Computer Name of the SMB server in windows network.


  description (, str, )
    Description of the SMB server.


  domain (, str, )
    Domain name where SMB server is registered in Active Directory.


  workgroup (, str, )
    Windows network workgroup for the SMB server.


  is_standalone (, bool, )
    Indicates whether the SMB server is standalone.


  nasServer (, dict, )
    Information about the NAS server in the storage system.


    UnityNasServer (, dict, )
      Information about the NAS server in the storage system.


      id (, str, )
        Unique identifier of the NAS server instance.




  file_interfaces (, dict, )
    The file interfaces associated with the NAS server.


    UnityFileInterfaceList (, list, )
      List of file interfaces associated with the NAS server.


      UnityFileInterface (, dict, )
        Details of file interface associated with the NAS server.


        id (, str, )
          Unique identifier of the file interface.





  smb_multi_channel_supported (, bool, )
    Indicates whether the SMB 3.0+ multichannel feature is supported.


  smb_protocol_versions (, list, )
    Supported SMB protocols, such as 1.0, 2.0, 2.1, 3.0, and so on.


  smbca_supported (, bool, )
    Indicates whether the SMB server supports continuous availability.






Status
------





Authors
~~~~~~~

- Akash Shendge (@shenda1) <ansible.team@dell.com>