stormshield.sns.sns_command module – SNS command
Note
This module is part of the stormshield.sns collection (version 1.0.2).
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 stormshield.sns
.
To use it in a playbook, specify: stormshield.sns.sns_command
.
Synopsis
This module executes configuration commands or scripts on the remote appliance.
Configuration API reference: https://documentation.stormshield.eu/SNS/v3/en/Content/CLI_Serverd_Commands_reference_Guide_v3/Introduction.htm
Parameters
Parameter |
Comments |
---|---|
SNS appliance connection parameters |
|
Path to the CA bundle file Default: |
|
Hostname or ip |
|
IP address |
|
Connection password |
|
Port to connect Default: |
|
Proxy URL (scheme://user:password@host:port) Default: |
|
Strict SSL host name check Choices:
|
|
Strict SSL CA check Choices:
|
|
User name Default: |
|
Path to the user certificate file Default: |
|
Command to execute (one of command or script parameters is required). |
|
Set to True if the script makes the remote appliance to disconnect (ie: install firmware update). Choices:
|
|
Set to true to disconnect other administrator already connected with modify privilege. Choices:
|
|
Configuration script to execute (one of command or script parameters is required). |
|
Set the connection and read timeout. Default: |
Notes
Note
This module requires the stormshield.sns.sslclient python library
Examples
- name: Get appliance properties
stormshield.sns.sns_command:
script: "SYSTEM PROPERTY"
appliance:
host: myappliance.local
password: mypassword
- name: Update firmware with a local update file
stormshield.sns.sns_command:
script: |
SYSTEM UPDATE UPLOAD < /tmp/fwupd-SNS-3.7.1-amd64-M.maj
SYSTEM UPDATE ACTIVATE
expect_disconnect: True
appliance:
host: myappliance.local
password: mypassword
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
last parsed command result Returned: success Sample: |
|
script execution output Returned: changed Sample: |
|
last command output Returned: changed Sample: |
|
last command return code Returned: changed Sample: |