The Basics

The ansible-solace modules use a variety of the APIs provided by the Solace PubSub+ Platform: * Sempv2 Config & Monitor Api * Sempv1 Api for situations where no equivalent Sempv2 call exists * Solace Cloud Api for specific functionality only available in Solace Cloud * A mix of Apis, where the Api used depends on the Solace Broker edition. For example, client profile & certificate authorities.

The modules generally follow the same naming convention as the SEMP v2 API calls so there is an easy mapping between the SEMP documentation and the ansible-solace module name. For example: SEMP v2 API: clientUsername maps to solace_client_username – client username.

Some specific Solace Cloud APIs have modules as well, such as creating and deleting a service. They are named solace_cloud_{module}.

Types of Modules

  • Configuration modules: solace_{configuration-object}. - add/update/delete a configuration object - support the state parameter with values=[‘present’, ‘absent’] - support to configure the Broker objects in an idempotent manner

  • Monitor modules: solace_get_{configuration_object}s. - retrieve a list of configuration objects, either from the monitor or config Api

Ansible Hosts are not Hosts but Brokers

The Ansible concept of a host is that, a machine which Ansible logs into, transfers scripts, executes scripts, etc.

For `ansible-solace`, hosts are actually Brokers or Solace Cloud Accounts.

Which means a few things:
ansible_connection: local

Logging the SEMP/Solace API Calls

In order to log the REST calls made by ansible-solace, set the following environment variables:

Env Variable

Description

export ANSIBLE_SOLACE_ENABLE_LOGGING=True|False

switch logging on or off

export ANSIBLE_SOLACE_LOG_PATH=”path/log-file-name.log”

the full path & name of the log file to write to. ansible-solace will create the directory/ies if they don’t exist. appends log entries to an existing log file or creates a new one.

See also Setting & Retrieving Ansible-Solace Log Files for a further discussion of logging.

Note

The ansible-solace modules do NOT support check mode.