Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/modules/ome_active_directory.rst

raw
1 .. _ome_active_directory_module:
2
3
4 ome_active_directory -- Configure Active Directory groups to be used with Directory Services
5 ============================================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows to add, modify, and delete OpenManage Enterprise connection with Active Directory Service.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - python \>= 3.9.6
24
25
26
27 Parameters
28 ----------
29
30 domain_server (optional, list, None)
31 Enter the domain name or FQDN or IP address of the domain controller.
32
33 If \ :emphasis:`domain\_controller\_lookup`\ is \ :literal:`DNS`\ , enter the domain name to query DNS for the domain controllers.
34
35 If \ :emphasis:`domain\_controller\_lookup`\ is \ :literal:`MANUAL`\ , enter the FQDN or the IP address of the domain controller. The maximum number of Active Directory servers that can be added is three.
36
37
38 domain_controller_lookup (optional, str, DNS)
39 Select the Domain Controller Lookup method.
40
41
42 domain_controller_port (optional, int, 3269)
43 Domain controller port.
44
45 By default, Global Catalog Address port number 3269 is populated.
46
47 For the Domain Controller Access, enter 636 as the port number.
48
49 \ :literal:`NOTE`\ , Only LDAPS ports are supported.
50
51
52 group_domain (optional, str, None)
53 Provide the group domain in the format \ :literal:`example.com`\ or \ :literal:`ou=org, dc=example, dc=com`\ .
54
55
56 id (optional, int, None)
57 Provide the ID of the existing Active Directory service connection.
58
59 This is applicable for modification and deletion.
60
61 This is mutually exclusive with \ :emphasis:`name`\ .
62
63
64 name (optional, str, None)
65 Provide a name for the Active Directory connection.
66
67 This is applicable for creation and deletion.
68
69 This is mutually exclusive with \ :emphasis:`name`\ .
70
71
72 network_timeout (optional, int, 120)
73 Enter the network timeout duration in seconds.
74
75 The supported timeout duration range is 15 to 300 seconds.
76
77
78 search_timeout (optional, int, 120)
79 Enter the search timeout duration in seconds.
80
81 The supported timeout duration range is 15 to 300 seconds.
82
83
84 state (optional, str, present)
85 \ :literal:`present`\ allows to create or modify an Active Directory service.
86
87 \ :literal:`absent`\ allows to delete a Active Directory service.
88
89
90 test_connection (optional, bool, False)
91 Enables testing the connection to the domain controller.
92
93 The connection to the domain controller is tested with the provided Active Directory service details.
94
95 If test fails, module will error out.
96
97 If \ :literal:`true`\ , \ :emphasis:`domain\_username`\ and \ :emphasis:`domain\_password`\ has to be provided.
98
99
100 domain_password (optional, str, None)
101 Provide the domain password.
102
103 This is applicable when \ :emphasis:`test\_connection`\ is \ :literal:`true`\ .
104
105
106 domain_username (optional, str, None)
107 Provide the domain username either in the UPN (username@domain) or NetBIOS (domain\\\\username) format.
108
109 This is applicable when \ :emphasis:`test\_connection`\ is \ :literal:`true`\ .
110
111
112 validate_certificate (optional, bool, False)
113 Enables validation of SSL certificate of the domain controller.
114
115 The module will always report change when this is \ :literal:`true`\ .
116
117
118 certificate_file (optional, path, None)
119 Provide the full path of the SSL certificate.
120
121 The certificate should be a Root CA Certificate encoded in Base64 format.
122
123 This is applicable when \ :emphasis:`validate\_certificate`\ is \ :literal:`true`\ .
124
125
126 hostname (True, str, None)
127 OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname.
128
129
130 username (False, str, None)
131 OpenManage Enterprise or OpenManage Enterprise Modular username.
132
133 If the username is not provided, then the environment variable \ :envvar:`OME\_USERNAME`\ is used.
134
135 Example: export OME\_USERNAME=username
136
137
138 password (False, str, None)
139 OpenManage Enterprise or OpenManage Enterprise Modular password.
140
141 If the password is not provided, then the environment variable \ :envvar:`OME\_PASSWORD`\ is used.
142
143 Example: export OME\_PASSWORD=password
144
145
146 x_auth_token (False, str, None)
147 Authentication token.
148
149 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`OME\_X\_AUTH\_TOKEN`\ is used.
150
151 Example: export OME\_X\_AUTH\_TOKEN=x\_auth\_token
152
153
154 port (optional, int, 443)
155 OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
156
157
158 validate_certs (optional, bool, True)
159 If \ :literal:`false`\ , the SSL certificates will not be validated.
160
161 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
162
163 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
164
165
166 ca_path (optional, path, None)
167 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
168
169
170 timeout (optional, int, 30)
171 The socket level timeout in seconds.
172
173
174
175
176
177 Notes
178 -----
179
180 .. note::
181 - The module will always report change when \ :emphasis:`validate\_certificate`\ is \ :literal:`true`\ .
182 - Run this module from a system that has direct access to OpenManage Enterprise.
183 - This module supports \ :literal:`check\_mode`\ .
184
185
186
187
188 Examples
189 --------
190
191 .. code-block:: yaml+jinja
192
193
194 ---
195 - name: Add Active Directory service using DNS lookup along with the test connection
196 dellemc.openmanage.ome_active_directory:
197 hostname: "192.168.0.1"
198 username: "username"
199 password: "password"
200 ca_path: "/path/to/ca_cert.pem"
201 name: my_ad1
202 domain_server:
203 - domainname.com
204 group_domain: domainname.com
205 test_connection: true
206 domain_username: user@domainname
207 domain_password: domain_password
208
209 - name: Add Active Directory service using IP address of the domain controller with certificate validation
210 dellemc.openmanage.ome_active_directory:
211 hostname: "192.168.0.1"
212 username: "username"
213 password: "password"
214 ca_path: "/path/to/ca_cert.pem"
215 name: my_ad2
216 domain_controller_lookup: MANUAL
217 domain_server:
218 - 192.68.20.181
219 group_domain: domainname.com
220 validate_certificate: true
221 certificate_file: "/path/to/certificate/file.cer"
222
223 - name: Modify domain controller IP address, network_timeout and group_domain
224 dellemc.openmanage.ome_active_directory:
225 hostname: "192.168.0.1"
226 username: "username"
227 password: "password"
228 ca_path: "/path/to/ca_cert.pem"
229 name: my_ad2
230 domain_controller_lookup: MANUAL
231 domain_server:
232 - 192.68.20.189
233 group_domain: newdomain.in
234 network_timeout: 150
235
236 - name: Delete Active Directory service
237 dellemc.openmanage.ome_active_directory:
238 hostname: "192.168.0.1"
239 username: "username"
240 password: "password"
241 ca_path: "/path/to/ca_cert.pem"
242 name: my_ad2
243 state: absent
244
245 - name: Test connection to existing Active Directory service with certificate validation
246 dellemc.openmanage.ome_active_directory:
247 hostname: "192.168.0.1"
248 username: "username"
249 password: "password"
250 ca_path: "/path/to/ca_cert.pem"
251 name: my_ad2
252 test_connection: true
253 domain_username: user@domainname
254 domain_password: domain_password
255 validate_certificate: true
256 certificate_file: "/path/to/certificate/file.cer"
257
258
259
260 Return Values
261 -------------
262
263 msg (always, str, Successfully renamed the slot(s).)
264 Overall status of the Active Directory operation.
265
266
267 active_directory (on change, dict, {'Name': 'ad_test', 'Id': 21789, 'ServerType': 'MANUAL', 'ServerName': ['192.168.20.181'], 'DnsServer': [], 'GroupDomain': 'dellemcdomain.com', 'NetworkTimeOut': 120, 'Password': None, 'SearchTimeOut': 120, 'ServerPort': 3269, 'CertificateValidation': False})
268 The Active Directory that was added, modified or deleted by this module.
269
270
271 error_info (on HTTP error, dict, {'error_info': {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to connect to the LDAP or AD server because the entered credentials are invalid.', 'MessageArgs': [], 'MessageId': 'CSEC5002', 'RelatedProperties': [], 'Resolution': 'Make sure the server input configuration are valid and retry the operation.', 'Severity': 'Critical'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}}})
272 Details of the HTTP Error.
273
274
275
276
277
278 Status
279 ------
280
281
282
283
284
285 Authors
286 ~~~~~~~
287
288 - Jagadeesh N V(@jagadeeshnv)
289 - Bhavneet Sharma (@Bhavneet-Sharma)
290