nsxt_certificates – Add a New Certificate

New in version 2.7.

Synopsis

  • Adds a new private-public certificate or a chain of certificates (CAs) and, optionally, a private key that can be applied to one of the user-facing components (appliance management or edge). The certificate and the key should be stored in PEM format. If no private key is provided, the certificate is used as a client certificate in the trust store.

Parameters

Parameter Choices/Defaults Comments
description
string
Description of this resource
display_name
string / required
Identifier to use when displaying entity in logs or GUI
hostname
string / required
Deployed NSX manager hostname.
id
string
Unique identifier of this resource
key_algo
string
Key algorithm contained in this certificate
passphrase
string
Password for private key encryption
password
string / required
The password to authenticate with the NSX manager.
pem_encoded_file
string / required
File containing pem encoded certificate data
private_key_file
string
File containing private key data
resource_type
string
Must be set to the value TrustObjectData
state
- / required
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
tags
Array of Tag
Opaque identifier meaninful to API user
username
string / required
The username to authenticate with the NSX manager.

Examples

- hosts: 127.0.0.1
  connection: local
  become: yes
  vars_files:
    - answerfile.yml
  tasks:
    - name: Add a new certificate
      nsxt_certificates:
        hostname: "{{hostname}}"
        username: "{{username}}"
        password: "{{password}}"
        validate_certs: False
        display_name: "Certificate_file"
        pem_encoded_file: "/Path/to/crt/file"
        passphrase: "paraphrase"
        state: "present"

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by the Ansible Community. [community]

Authors

  • Kommireddy Akhilesh