solace_bridge_trusted_cn – trusted common name for bridge
Allows addition and removal of trusted commonn name objects on a bridge in an idempotent manner.
Examples
hosts: all
gather_facts: no
any_errors_fatal: true
collections:
- solace.pubsub_plus
module_defaults:
solace_bridge:
host: "{{ sempv2_host }}"
port: "{{ sempv2_port }}"
secure_connection: "{{ sempv2_is_secure_connection }}"
username: "{{ sempv2_username }}"
password: "{{ sempv2_password }}"
timeout: "{{ sempv2_timeout }}"
msg_vpn: "{{ vpn }}"
solace_bridge_trusted_cn:
host: "{{ sempv2_host }}"
port: "{{ sempv2_port }}"
secure_connection: "{{ sempv2_is_secure_connection }}"
username: "{{ sempv2_username }}"
password: "{{ sempv2_password }}"
timeout: "{{ sempv2_timeout }}"
msg_vpn: "{{ vpn }}"
tasks:
- name: create a bridge - disabled
solace_bridge:
name: the_bridge
settings:
enabled: false
state: present
- name: Remove Trusted Common Name
solace_bridge_trusted_cn:
name: "*.my.domain.com"
bridge_name: the_bridge
state: absent
- name: Add Trusted Common Name
solace_bridge_trusted_cn:
name: "*.my.domain.com"
bridge_name: bar
state: present
Notes
Note
Module Sempv2 Config: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/config/index.html#/bridge/createMsgVpnBridgeTlsTrustedCommonName
Sempv2 Config Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/config/index.html#/
Sempv2 Monitor Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html#/
Sempv2 Action Reference: https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/action/index.html#/
Parameters
- bridge_name (required)
The bridge.
type: str- bridge_virtual_router (optional)
The virtual router.
type: strdefault: autochoices: primary, backup, autoaliases: virtual_router- host (optional)
Hostname of Solace Broker.
type: strdefault: localhost- msg_vpn (required)
The message vpn.
type: str- name (required)
The trusted common name. Maps to ‘tlsTrustedCommonName’ in the API.
type: straliases: tls_trusted_common_name- password (optional)
Administrator password for Solace Broker.
type: strdefault: admin- port (optional)
Management port of Solace Broker.
type: intdefault: 8080- reverse_proxy (optional)
Use a reverse proxy / api gateway. Note: Experimental. Not permitted for Solace Cloud API.
type: dict- headers (optional)
Additional headers to add to the http call. Example: ‘apiKey: {my-api-key}’.
type: dict- x-asc-module (optional)
Flag for the module to add the header ‘x-asc-module:{module-name}’ to the http call with it’s module name.
type: booldefault: False- x-asc-module-op (optional)
Flag for the module to add the header ‘x-asc-module-op:{module operation}’ to the http call with the module’s operation.
type: booldefault: False
- query_params (optional)
Additional query paramters to add to the URL. Example: ‘apiCode: {my-api-code}’.
type: dict- semp_base_path (optional)
Base path prepended to all SEMP calls. Example: ‘my/base/path’. Resulting URL will be: http(s)://{host}:{port}/{semp_base_path}/{module-semp-call-path}
type: str- use_basic_auth (optional)
Flag to use basic authentication in the http(s) call or not. Uses ‘username’/’password’.
type: booldefault: False
- secure_connection (optional)
If true, use https rather than http.
type: booldefault: False- sempv2_settings (optional)
JSON dictionary of additional configuration for the SEMP V2 API. See Reference documentation.
type: dictaliases: settings- state (optional)
Target state.
type: strdefault: presentchoices: present, absent- timeout (optional)
Connection timeout in seconds for the http request.
type: intdefault: 10- username (optional)
Administrator username for Solace Broker.
type: strdefault: admin- validate_certs (optional)
Flag to switch validation of client certificates on/off when using a secure connection.
type: booldefault: True- x_broker (optional)
Custom HTTP header with the broker virtual router id, if using a SEMPv2 Proxy/agent infrastructure.
type: str
Return Values
- response
The response from the Solace Sempv2 request.
returned: successtype: dict- msg
The response from the HTTP call in case of error.
returned: errortype: dict- rc
Return code. rc=0 on success, rc=1 on error.
returned: alwaystype: intsample:{ "error": { "rc": 1 }, "success": { "rc": 0 } }