Debian Codegraph @

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

raw
1 .. _ome_application_certificate_module:
2
3
4 ome_application_certificate -- This module allows to generate a CSR and upload the certificate
5 ==============================================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows the generation a new certificate signing request (CSR) and to upload the certificate on OpenManage Enterprise.
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`\ allows the generation of a CSR and \ :literal:`upload`\ uploads the certificate.
32
33
34 distinguished_name (optional, str, None)
35 Name of the certificate issuer. This option is applicable for \ :literal:`generate\_csr`\ .
36
37
38 department_name (optional, str, None)
39 Name of the department that issued the certificate. This option is applicable for \ :literal:`generate\_csr`\ .
40
41
42 business_name (optional, str, None)
43 Name of the business that issued the certificate. This option is applicable for \ :literal:`generate\_csr`\ .
44
45
46 locality (optional, str, None)
47 Local address of the issuer of the certificate. This option is applicable for \ :literal:`generate\_csr`\ .
48
49
50 country_state (optional, str, None)
51 State in which the issuer resides. This option is applicable for \ :literal:`generate\_csr`\ .
52
53
54 country (optional, str, None)
55 Country in which the issuer resides. This option is applicable for \ :literal:`generate\_csr`\ .
56
57
58 email (optional, str, None)
59 Email associated with the issuer. This option is applicable for \ :literal:`generate\_csr`\ .
60
61
62 subject_alternative_names (optional, str, None)
63 Subject alternative name required for the certificate signing request generation.
64
65 Supports up to 4 comma separated values starting from primary, secondary, Tertiary and Quaternary values.
66
67
68 upload_file (optional, str, None)
69 Local path of the certificate file to be uploaded. This option is applicable for \ :literal:`upload`\ . Once the certificate is uploaded, OpenManage Enterprise cannot be accessed for a few seconds.
70
71
72 hostname (True, str, None)
73 OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname.
74
75
76 username (False, str, None)
77 OpenManage Enterprise or OpenManage Enterprise Modular username.
78
79 If the username is not provided, then the environment variable \ :envvar:`OME\_USERNAME`\ is used.
80
81 Example: export OME\_USERNAME=username
82
83
84 password (False, str, None)
85 OpenManage Enterprise or OpenManage Enterprise Modular password.
86
87 If the password is not provided, then the environment variable \ :envvar:`OME\_PASSWORD`\ is used.
88
89 Example: export OME\_PASSWORD=password
90
91
92 x_auth_token (False, str, None)
93 Authentication token.
94
95 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`OME\_X\_AUTH\_TOKEN`\ is used.
96
97 Example: export OME\_X\_AUTH\_TOKEN=x\_auth\_token
98
99
100 port (optional, int, 443)
101 OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
102
103
104 validate_certs (optional, bool, True)
105 If \ :literal:`false`\ , the SSL certificates will not be validated.
106
107 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
108
109 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
110
111
112 ca_path (optional, path, None)
113 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
114
115
116 timeout (optional, int, 30)
117 The socket level timeout in seconds.
118
119
120
121
122
123 Notes
124 -----
125
126 .. note::
127 - If a certificate is uploaded, which is identical to an already existing certificate, it is accepted by the module.
128 - This module does not support \ :literal:`check\_mode`\ .
129
130
131
132
133 Examples
134 --------
135
136 .. code-block:: yaml+jinja
137
138
139 ---
140 - name: Generate a certificate signing request
141 dellemc.openmanage.ome_application_certificate:
142 hostname: "192.168.0.1"
143 username: "username"
144 password: "password"
145 ca_path: "/path/to/ca_cert.pem"
146 command: "generate_csr"
147 distinguished_name: "hostname.com"
148 department_name: "Remote Access Group"
149 business_name: "Dell Inc."
150 locality: "Round Rock"
151 country_state: "Texas"
152 country: "US"
153 email: "[email protected]"
154
155 - name: Generate a certificate signing request with subject alternative names
156 dellemc.openmanage.ome_application_certificate:
157 hostname: "192.168.0.1"
158 username: "username"
159 password: "password"
160 ca_path: "/path/to/ca_cert.pem"
161 command: "generate_csr"
162 distinguished_name: "hostname.com"
163 subject_alternative_names: "hostname1.chassis.com,hostname2.chassis.com"
164 department_name: "Remote Access Group"
165 business_name: "Dell Inc."
166 locality: "Round Rock"
167 country_state: "Texas"
168 country: "US"
169 email: "[email protected]"
170
171 - name: Upload the certificate
172 dellemc.openmanage.ome_application_certificate:
173 hostname: "192.168.0.1"
174 username: "username"
175 password: "password"
176 ca_path: "/path/to/ca_cert.pem"
177 command: "upload"
178 upload_file: "/path/certificate.cer"
179
180
181
182 Return Values
183 -------------
184
185 msg (always, str, Successfully generated certificate signing request.)
186 Overall status of the certificate signing request.
187
188
189 csr_status (on success, dict, {'CertificateData': '-----BEGIN CERTIFICATE REQUEST-----GHFSUEKLELE af3u4h2rkdkfjasczjfefhkrr/frjrfrjfrxnvzklf/nbcvxmzvndlskmcvbmzkdk kafhaksksvklhfdjtrhhffgeth/tashdrfstkm@kdjFGD/sdlefrujjfvvsfeikdf yeufghdkatbavfdomehtdnske/tahndfavdtdfgeikjlagmdfbandfvfcrfgdtwxc qwgfrteyupojmnsbajdkdbfs/ujdfgthedsygtamnsuhakmanfuarweyuiwruefjr etwuwurefefgfgurkjkdmbvfmvfvfk==-----END CERTIFICATE REQUEST-----'})
190 Details of the generated certificate.
191
192
193 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': 'CSEC9002', 'RelatedProperties': [], 'Message': 'Unable to upload the certificate because the certificate file provided is invalid.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Make sure the CA certificate and private key are correct and retry the operation.'}]}})
194 Details of the HTTP error.
195
196
197
198
199
200 Status
201 ------
202
203
204
205
206
207 Authors
208 ~~~~~~~
209
210 - Felix Stephen (@felixs88)
211 - Kritika Bhateja (@Kritika-Bhateja-03)
212 - Jennifer John (@Jennifer-John)
213 - Sapana Gupta (@sapana05)
214