dellemc.openmanage.ome_application_certificate – This module allows to generate a CSR and upload the certificate

From Get docs
Ansible/docs/2.11/collections/dellemc/openmanage/ome application certificate module


dellemc.openmanage.ome_application_certificate – This module allows to generate a CSR and upload the certificate

Note

This plugin is part of the dellemc.openmanage collection (version 3.0.0).

To install it use: ansible-galaxy collection install dellemc.openmanage.

To use it in a playbook, specify: dellemc.openmanage.ome_application_certificate.


New in version 2.1.0: of dellemc.openmanage


Synopsis

  • This module allows the generation a new certificate signing request (CSR) and to upload the certificate on OpenManage Enterprise.

Requirements

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

  • python >= 2.7.5

Parameters

Parameter Choices/Defaults Comments

business_name

string

Name of the business that issued the certificate. This option is applicable for generate_csr.

command

string

  • generate_csr

  • upload

generate_csr allows the generation of a CSR and upload uploads the certificate.

country

string

Country in which the issuer resides. This option is applicable for generate_csr.

country_state

string

State in which the issuer resides. This option is applicable for generate_csr.

department_name

string

Name of the department that issued the certificate. This option is applicable for generate_csr.

distinguished_name

string

Name of the certificate issuer. This option is applicable for generate_csr.

email

string

Email associated with the issuer. This option is applicable for generate_csr.

hostname

string / required

Target IP address or hostname.

locality

string

Local address of the issuer of the certificate. This option is applicable for generate_csr.

password

string / required

Target user password.

port

integer

Default:

443

Target HTTPS port.

upload_file

string

Local path of the certificate file to be uploaded. This option is applicable for upload. Once the certificate is uploaded, OpenManage Enterprise cannot be accessed for a few seconds.

username

string / required

Target username.



Notes

Note

  • If a certificate is uploaded, which is identical to an already existing certificate, it is accepted by the module.
  • This module does not support check_mode.


Examples

---
- name: Generate a certificate signing request
  dellemc.openmanage.ome_application_certificate:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    command: "generate_csr"
    distinguished_name: "hostname.com"
    department_name: "Remote Access Group"
    business_name: "Dell Inc."
    locality: "Round Rock"
    country_state: "Texas"
    country: "US"
    email: "[email protected]"

- name: Upload the certificate
  dellemc.openmanage.ome_application_certificate:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    command: "upload"
    upload_file: "/path/certificate.cer"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

csr_status

dictionary

on success

Details of the generated certificate.


Sample:

{'CertificateData': '-----BEGIN CERTIFICATE REQUEST-----GHFSUEKLELE af3u4h2rkdkfjasczjfefhkrr/frjrfrjfrxnvzklf/nbcvxmzvndlskmcvbmzkdk kafhaksksvklhfdjtrhhffgeth/tashdrfstkm@kdjFGD/sdlefrujjfvvsfeikdf yeufghdkatbavfdomehtdnske/tahndfavdtdfgeikjlagmdfbandfvfcrfgdtwxc qwgfrteyupojmnsbajdkdbfs/ujdfgthedsygtamnsuhakmanfuarweyuiwruefjr etwuwurefefgfgurkjkdmbvfmvfvfk==-----END CERTIFICATE REQUEST-----'}

error_info

dictionary

on HTTP error

Details of the HTTP error.


Sample:

{'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to upload the certificate because the certificate file provided is invalid.', 'MessageArgs': [], 'MessageId': 'CSEC9002', 'RelatedProperties': [], 'Resolution': 'Make sure the CA certificate and private key are correct and retry the operation.', 'Severity': 'Critical'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}}

msg

string

always

Overall status of the certificate signing request.


Sample:

Successfully generated certificate signing request.




Authors

  • Felix Stephen (@felixs88)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/dellemc/openmanage/ome_application_certificate_module.html