Debian Codegraph @

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

raw
1 .. _idrac_certificates_module:
2
3
4 idrac_certificates -- Configure certificates for iDRAC
5 ======================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows to generate certificate signing request, import, and export certificates on iDRAC.
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 command (optional, str, generate_csr)
31 \ :literal:`generate\_csr`\ , generate CSR. This requires \ :emphasis:`cert\_params`\ and \ :emphasis:`certificate\_path`\ . This is applicable only for \ :literal:`HTTPS`\
32
33 \ :literal:`import`\ , import the certificate file. This requires \ :emphasis:`certificate\_path`\ .
34
35 \ :literal:`export`\ , export the certificate. This requires \ :emphasis:`certificate\_path`\ .
36
37 \ :literal:`reset`\ , reset the certificate to default settings. This is applicable only for \ :literal:`HTTPS`\ .
38
39
40 certificate_type (optional, str, HTTPS)
41 Type of the iDRAC certificate.
42
43 \ :literal:`HTTPS`\ The Dell self-signed SSL certificate.
44
45 \ :literal:`CA`\ Certificate Authority(CA) signed SSL certificate.
46
47 \ :literal:`CUSTOMCERTIFICATE`\ The custom PKCS12 certificate and private key. Export of custom certificate is supported only on iDRAC firmware version 7.00.00.00 and above.
48
49 \ :literal:`CSC`\ The custom signing SSL certificate.
50
51 \ :literal:`CLIENT\_TRUST\_CERTIFICATE`\ Client trust certificate.
52
53
54 certificate_path (optional, path, None)
55 Absolute path of the certificate file if \ :emphasis:`command`\ is \ :literal:`import`\ .
56
57 Directory path with write permissions if \ :emphasis:`command`\ is \ :literal:`generate\_csr`\ or \ :literal:`export`\ .
58
59
60 passphrase (optional, str, None)
61 The passphrase string if the certificate to be imported is passphrase protected.
62
63
64 ssl_key (optional, path, None)
65 Absolute path of the private or SSL key file.
66
67 This is applicable only when \ :emphasis:`command`\ is \ :literal:`import`\ and \ :emphasis:`certificate\_type`\ is \ :literal:`HTTPS`\ .
68
69 Uploading the SSL key to iDRAC is supported on firmware version 6.00.02.00 and above.
70
71
72 cert_params (optional, dict, None)
73 Certificate parameters to generate signing request.
74
75
76 common_name (True, str, None)
77 The common name of the certificate.
78
79
80 organization_unit (True, str, None)
81 The name associated with an organizational unit. For example department name.
82
83
84 locality_name (True, str, None)
85 The city or other location where the entity applying for certification is located.
86
87
88 state_name (True, str, None)
89 The state where the entity applying for certification is located.
90
91
92 country_code (True, str, None)
93 The country code of the country where the entity applying for certification is located.
94
95
96 email_address (optional, str, None)
97 The email associated with the CSR.
98
99
100 organization_name (True, str, None)
101 The name associated with an organization.
102
103
104 subject_alt_name (optional, list, [])
105 The alternative domain names associated with the request.
106
107
108
109 resource_id (optional, str, None)
110 Redfish ID of the resource.
111
112
113 reset (optional, bool, True)
114 To reset the iDRAC after the certificate operation.
115
116 This is applicable when \ :emphasis:`command`\ is \ :literal:`import`\ or \ :literal:`reset`\ .
117
118
119 wait (optional, int, 600)
120 Maximum wait time for iDRAC to start after the reset, in seconds.
121
122 This is applicable when \ :emphasis:`command`\ is \ :literal:`import`\ or \ :literal:`reset`\ and \ :emphasis:`reset`\ is \ :literal:`true`\ .
123
124
125 idrac_ip (True, str, None)
126 iDRAC IP Address.
127
128
129 idrac_user (False, str, None)
130 iDRAC username.
131
132 If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used.
133
134 Example: export IDRAC\_USERNAME=username
135
136
137 idrac_password (False, str, None)
138 iDRAC user password.
139
140 If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used.
141
142 Example: export IDRAC\_PASSWORD=password
143
144
145 x_auth_token (False, str, None)
146 Authentication token.
147
148 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used.
149
150 Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token
151
152
153 idrac_port (optional, int, 443)
154 iDRAC port.
155
156
157 validate_certs (optional, bool, True)
158 If \ :literal:`false`\ , the SSL certificates will not be validated.
159
160 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
161
162 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
163
164
165 ca_path (optional, path, None)
166 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
167
168
169 timeout (optional, int, 30)
170 The socket level timeout in seconds.
171
172
173
174
175
176 Notes
177 -----
178
179 .. note::
180 - The certificate operations are supported on iDRAC firmware version 6.10.80.00 and above.
181 - Run this module from a system that has direct access to Dell iDRAC.
182 - This module supports \ :literal:`check\_mode`\ .
183 - This module supports IPv4 and IPv6 addresses.
184
185
186
187
188 Examples
189 --------
190
191 .. code-block:: yaml+jinja
192
193
194 ---
195 - name: Generate HTTPS certificate signing request
196 dellemc.openmanage.idrac_certificates:
197 idrac_ip: "192.168.0.1"
198 idrac_user: "user_name"
199 idrac_password: "user_password"
200 ca_path: "/path/to/ca_cert.pem"
201 command: "generate_csr"
202 certificate_type: "HTTPS"
203 certificate_path: "/home/omam/mycerts"
204 cert_params:
205 common_name: "sample.domain.com"
206 organization_unit: "OrgUnit"
207 locality_name: "Bangalore"
208 state_name: "Karnataka"
209 country_code: "IN"
210 email_address: "[email protected]"
211 organization_name: "OrgName"
212 subject_alt_name:
213 - 192.198.2.1
214
215 - name: Import a HTTPS certificate.
216 dellemc.openmanage.idrac_certificates:
217 idrac_ip: "192.168.0.1"
218 idrac_user: "user_name"
219 idrac_password: "user_password"
220 ca_path: "/path/to/ca_cert.pem"
221 command: "import"
222 certificate_type: "HTTPS"
223 certificate_path: "/path/to/cert.pem"
224
225 - name: Import an HTTPS certificate along with its private key.
226 dellemc.openmanage.idrac_certificates:
227 idrac_ip: "192.168.0.1"
228 idrac_user: "user_name"
229 idrac_password: "user_password"
230 ca_path: "/path/to/ca_cert.pem"
231 command: "import"
232 certificate_type: "HTTPS"
233 certificate_path: "/path/to/cert.pem"
234 ssl_key: "/path/to/private_key.pem"
235
236 - name: Export a HTTPS certificate.
237 dellemc.openmanage.idrac_certificates:
238 idrac_ip: "192.168.0.1"
239 idrac_user: "user_name"
240 idrac_password: "user_password"
241 ca_path: "/path/to/ca_cert.pem"
242 command: "export"
243 certificate_type: "HTTPS"
244 certificate_path: "/home/omam/mycert_dir"
245
246 - name: Import a CSC certificate.
247 dellemc.openmanage.idrac_certificates:
248 idrac_ip: "192.168.0.1"
249 idrac_user: "user_name"
250 idrac_password: "user_password"
251 ca_path: "/path/to/ca_cert.pem"
252 command: "import"
253 certificate_type: "CSC"
254 certificate_path: "/path/to/cert.pem"
255
256 - name: Import a custom certificate with a passphrase.
257 dellemc.openmanage.idrac_certificates:
258 idrac_ip: "192.168.0.1"
259 idrac_user: "user_name"
260 idrac_password: "user_password"
261 command: "import"
262 certificate_type: "CUSTOMCERTIFICATE"
263 certificate_path: "/path/to/idrac_cert.p12"
264 passphrase: "cert_passphrase"
265 reset: false
266
267 - name: Export a Client trust certificate.
268 dellemc.openmanage.idrac_certificates:
269 idrac_ip: "192.168.0.1"
270 idrac_user: "user_name"
271 idrac_password: "user_password"
272 ca_path: "/path/to/ca_cert.pem"
273 command: "export"
274 certificate_type: "CLIENT_TRUST_CERTIFICATE"
275 certificate_path: "/home/omam/mycert_dir"
276
277
278
279 Return Values
280 -------------
281
282 msg (always, str, Successfully performed the 'generate_csr' certificate operation.)
283 Status of the certificate configuration operation.
284
285
286 certificate_path (when I(command) is C(export) or C(generate_csr), str, /home/ansible/myfiles/cert.pem)
287 The csr or exported certificate file path
288
289
290 error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}})
291 Details of the HTTP Error.
292
293
294
295
296
297 Status
298 ------
299
300
301
302
303
304 Authors
305 ~~~~~~~
306
307 - Jagadeesh N V(@jagadeeshnv)
308 - Rajshekar P(@rajshekarp87)
309 - Kristian Lamb V(@kristian_lamb)
310