Horizon feed (discovery) 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_feed.

Synopsis

  • Present a certificate from a discovery campaign to be used by Horizon.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

ca_bundle

path

Path of a CA bundle used to validate the Horizon instance SSL certificate.

campaign

string / required

The name of the discovery campaign to feed into.

certificate_pem

any / required

The PEM-encoded certificate to feed the discovery campaign with.

src

path

The path to a certificate PEM file.

client_cert

path

Path of a client certificate.

Required if you use certificate based authentication

client_key

path

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.

connect_timeout

float

Maximum number of seconds to wait for the controller to establish a connection to Horizon.

Default: 10.0

endpoint

string / required

Your Horizon instance base endpoint.

It must include the protocol (https://) and no trailing slash nor path.

hostnames

list / elements=string

The certificate’s hostnames.

ip

string / required

The certificate’s host IP address

operating_systems

list / elements=string

The certificate’s host operating system.

paths

list / elements=string

The path to the certificate on the host machine.

read_timeout

float

Maximum number of seconds to wait between response reads by the controller after connecting to Horizon.

Default: 60.0

usages

list / elements=string

The path of the configuration files that were used to find the certificates.

x_api_id

string

Horizon identifier

Required if you use credentials authentication

x_api_key

string

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 no_log=true.

Notes

Note

  • Feeding a certificate requires permissions on the specified discovery campaign.

Examples

- name: Feed a certificate by its content
  evertrust.horizon.horizon_feed:
    endpoint: "https://<horizon-endpoint>"
    x_api_id: "<horizon-id>"
    x_api_key: "<horizon-password>"
    campaign: exampleCampaign
    ip: localhost
    certificate_pem: "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"

- name: Feed a certificate by a file
  evertrust.horizon.horizon_feed:
    endpoint: "https://<horizon-endpoint>"
    x_api_id: "<horizon-id>"
    x_api_key: "<horizon-password>"
    campaign: exampleCampaign
    ip: localhost
    certificate_pem:
      src: pem/file/path

Return Values

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

Key

Description

response

any

Response body returned by the Horizon discovery-feed endpoint.

The current Horizon SDK returns no response body, so this value is null.

Returned: On success

Authors

  • Evertrust R&D (@EverTrust)