Horizon recover plugin
Note
This module is part of the evertrust.horizon collection (version 2.0.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install evertrust.horizon.
To use it in a playbook, specify: evertrust.horizon.horizon_recover.
Synopsis
Performs a recovery against the Horizon API.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
|---|---|
Path of a CA bundle used to validate the Horizon instance SSL certificate. |
|
The PEM encoded certificate to recover. |
|
The path to the PEM encoded certificate to recover. |
|
Path of a client certificate. Required if you use certificate based authentication |
|
Path to the private key used for client-certificate authentication. Required if you use certificate based authentication. Restrict access to the key and inventory configuration files. |
|
Maximum number of seconds to wait for the controller to establish a connection to Horizon. Default: |
|
Your Horizon instance base endpoint. It must include the protocol (https://) and no trailing slash nor path. |
|
Security password for the certificate. Password policies will be applied to check validity. Only required if the password generation mode is manual. |
|
Maximum number of seconds to wait between response reads by the controller after connecting to Horizon. Default: |
|
Horizon identifier Required if you use credentials authentication |
|
Secret API key used for Horizon credential authentication. Required if you use credentials authentication. Store this value with Ansible Vault. Tasks containing lookup expressions with this value should use |
Notes
Note
Recovering a certificate requires permissions on the related profile.
Be sure to use the “Recover API” permission instead of “Recover”.
Examples
- name: Recover a certificate by its content
evertrust.horizon.horizon_recover:
endpoint: "https://<horizon-endpoint>"
x_api_id: "<horizon-id>"
x_api_key: "<horizon-password>"
certificate_pem: "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"
password: "examplePassword"
- name: Recover a certificate by a file
evertrust.horizon.horizon_recover:
endpoint: "https://<horizon-endpoint>"
x_api_id: "<horizon-id>"
x_api_key: "<horizon-password>"
certificate_pem:
src: pem/file/path
password: "examplePassword"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The recovered certificate. Returned: On successful certificate recovery |
|
Horizon internal ID. Returned: If present |
|
The certificate’s PEM-encoded content. Returned: If present |
|
The certificate’s contact email. It will be used to send notifications about the certificate’s expiration and revocation. Returned: If present |
|
Whether the certificate’s revocation status is synchronized with a CRL. Returned: If present |
|
True if the certificate was discovered and issued by an existing trusted CA. False if the certificate was discovered but not issued by a trusted CA. Null if the certificate was not discovered. Returned: If present |
|
A list of metadata containing information on where the certificate was discovered. Returned: Only if the certificate was discovered |
|
The certificate’s hostnames (netscan only). Returned: If present |
|
The certificate’s host IP address. Returned: Always |
|
The certificate’s host operating system (localscan only). Returned: If present |
|
The path to the certificate on the host machine (localscan only). Returned: If present |
|
Information on the type of discovery that discovered this certificate. Returned: Always |
|
The ports on which the certificate is exposed for HTTPS connection. Returned: If present |
|
The number of the port. Returned: Always |
|
Protocol version used. Returned: Always |
|
The path of the configuration files that were used to find the certificates. Returned: If present |
|
A list of metadata containing information on how and when the certificate was discovered. Returned: If present |
|
The discovery campaign’s name. Returned: Always |
|
Identifier of the user that discovered this certificate. Returned: If present |
|
When this certificate was discovered for the last time. Returned: Always |
|
The certificate’s Distinguished Name. Returned: If present |
|
The certificate’s extensions. Returned: If present |
|
The extension’s type. Returned: Always |
|
The extension’s value. Returned: Always |
|
The certificate’s grades for the enabled grading policies. Returned: If present |
|
The grade awarded by the grading policy. Returned: Always |
|
The name of the grading policy. Returned: Always |
|
The certificate’s computed holder ID. It counts similar certificates used simultaneously by the same holder. Returned: If present |
|
The certificate’s issuer Distinguished Name. Returned: If present |
|
The certificate’s key type. Returned: If present |
|
The certificate’s labels. Returned: If present |
|
The label’s name. Returned: Always |
|
The label’s value. Returned: Always |
|
The certificate’s technical metadata used internally. Returned: If present |
|
The metadata name. Returned: Always |
|
The metadata value. Returned: Always |
|
The certificate’s module. Returned: If present |
|
The certificate’s expiration date in milliseconds since the epoch. Returned: If present |
|
The certificate’s start date in milliseconds since the epoch. Returned: If present |
|
The certificate’s owner. This is a reference to a local identity identifier. Returned: If present |
|
The certificate’s profile. Returned: If present |
|
The certificate’s public key thumbprint. Returned: If present |
|
The certificate’s revocation date in milliseconds since the epoch. This field is only present if the certificate is revoked. Returned: If present |
|
The certificate’s revocation reason. Returned: If present |
|
Whether the certificate is revoked. Returned: If present |
|
Whether the certificate is self-signed. Returned: If present |
|
The certificate’s serial number. Returned: If present |
|
The certificate’s signing algorithm. Returned: If present |
|
The certificate’s Subject Alternate Names. Returned: If present |
|
The type of the SAN. Returned: Always |
|
The value of the SAN. Returned: Always |
|
The certificate’s team, as a reference to a team identifier. It determines certificate permissions and notification recipients. Returned: If present |
|
The certificate’s information about synchronization with Horizon supported third parties. Returned: If present |
|
The third party connector name on which this certificate is synchronized. Returned: Always |
|
The fingerprint of this certificate on the third party. Returned: If present |
|
The ID of this certificate on the third party. Returned: Always |
|
The date when the certificate was pushed to this third party. Returned: If present |
|
The date when the certificate was removed from this third party (in case of revocation). Returned: If present |
|
The certificate’s thumbprint. Returned: If present |
|
The result of the execution of triggers on this certificate. Returned: If present |
|
Contains details on this trigger’s execution. Returned: If present |
|
The event that triggered the trigger. Returned: Always |
|
The last time this trigger was executed for this certificate and this event. Returned: Always |
|
The name of the trigger that was executed. Returned: Always |
|
Time that will be waited between the two successive executions of this trigger. Returned: If present |
|
The next scheduled execution time for this trigger. Returned: If present |
|
The number of remaining tries before the trigger is abandoned. Returned: If present |
|
Is this trigger manually retryable. Returned: Always |
|
The status of the trigger after its execution. Returned: Always |
|
The type of the trigger. Returned: Always |
|
Certificate’s trust chain. Returned: When the certificate is returned |
|
Certificate’s private key. Returned: If present |
|
Base64-encoded PKCS#12 Returned: If present |
|
PKCS#12 password. Returned: If present |