netapp.storagegrid.na_sg_grid_client_certificate (21.12.0) — module

Manage Client Certificates on StorageGRID

| "added in version" 21.11.0 of netapp.storagegrid"

Authors: NetApp Ansible Team (@joshedmonds) <ng-ansibleteam@netapp.com>

Install collection

Install with ansible-galaxy collection install netapp.storagegrid:==21.12.0


Add to requirements.yml

  collections:
    - name: netapp.storagegrid
      version: 21.12.0

Description

Create, Update, Delete Client Certificates on NetApp StorageGRID.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: create client certificate
    netapp.storagegrid.na_sg_grid_client_certificate:
      api_url: "https://<storagegrid-endpoint-url>"
      auth_token: "storagegrid-auth-token"
      validate_certs: false
      state: present
      display_name: client-cert1
      public_key: |
        -----BEGIN CERTIFICATE-----
        MIIC6DCCAdACCQC7l4WukhKD0zANBgkqhkiG9w0BAQsFADA2..swCQYDVQQGEwJB
        BAMMHnNnYW4wMS5kZXYubWljcm9icmV3Lm5ldGFwcC5hdTCC..IwDQYJKoZIhvcN
        AQEBBQADggEPADCCAQoCggEBAMvjm9I35lmKcC7ITVL8+QiZ..lvdkbfZCUQrfdy
        71inP+XmPjs0rnkhICA9ItODteRcVlO+t7nDTfm7HgG0mJFk..m0ffyEYrcx24qu
        S7gXYQjRsJmrep1awoaCa20BMGuqK2WKI3IvZ7YiT22qkBqK..+hIFffX6u3Jy+B
        77pR6YcATtpMHW/AaOx+OX9l80dIRsRZKMDxYQ==
        -----END CERTIFICATE-----
      allow_prometheus: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: rename client certificate
    netapp.storagegrid.na_sg_grid_client_certificate:
      api_url: "https://<storagegrid-endpoint-url>"
      auth_token: "storagegrid-auth-token"
      validate_certs: false
      state: present
      certificate_id: 00000000-0000-0000-0000-000000000000
      display_name: client-cert1-rename
      public_key: |
        -----BEGIN CERTIFICATE-----
        MIIC6DCCAdACCQC7l4WukhKD0zANBgkqhkiG9w0BAQsFADA2..swCQYDVQQGEwJB
        BAMMHnNnYW4wMS5kZXYubWljcm9icmV3Lm5ldGFwcC5hdTCC..IwDQYJKoZIhvcN
        AQEBBQADggEPADCCAQoCggEBAMvjm9I35lmKcC7ITVL8+QiZ..lvdkbfZCUQrfdy
        71inP+XmPjs0rnkhICA9ItODteRcVlO+t7nDTfm7HgG0mJFk..m0ffyEYrcx24qu
        S7gXYQjRsJmrep1awoaCa20BMGuqK2WKI3IvZ7YiT22qkBqK..+hIFffX6u3Jy+B
        77pR6YcATtpMHW/AaOx+OX9l80dIRsRZKMDxYQ==
        -----END CERTIFICATE-----
      allow_prometheus: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: delete client certificate
    netapp.storagegrid.na_sg_grid_client_certificate:
      api_url: "https://<storagegrid-endpoint-url>"
      auth_token: "storagegrid-auth-token"
      validate_certs: false
      state: absent
      display_name: client-cert1-rename

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether the specified certificate should exist.
    type: str

api_url:
    description:
    - The url to the StorageGRID Admin Node REST API.
    required: true
    type: str

auth_token:
    description:
    - The authorization token for the API request
    required: true
    type: str

public_key:
    description:
    - X.509 client certificate in PEM-encoding.
    type: str

display_name:
    description:
    - A display name for the client certificate configuration.
    - This parameter can be modified if I(certificate_id) is also specified.
    type: str

certificate_id:
    description:
    - ID of the client certificate.
    type: str

validate_certs:
    default: true
    description:
    - Should https certificates be validated?
    required: false
    type: bool

allow_prometheus:
    description:
    - Whether the external monitoring tool can access Prometheus metrics.
    type: bool

Outputs

resp:
  description: Returns information about the StorageGRID server certificates.
  returned: success
  sample:
    allowPrometheus: true
    displayName: client-cert1
    expiryDate: '2024-01-01T00:00:00.000Z'
    id: abcABC_01234-0123456789abcABCabc0123456789==
    publicKey: '-----BEGIN CERTIFICATE-----MIIC6DCCAdACCQC7l4WukhKD0zANBgkqhkiG9w0BAQsFADA2MQswCQYDVQQGE...-----END
      CERTIFICATE-----'
  type: dict