stormshield.sns.sns_command module – SNS command
Note
This module is part of the stormshield.sns collection (version 1.0.1).
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 |
---|---|
appliance connection’s parameters (host, port, user, password, sslverifypeer, sslverifyhost, cabundle, usercert, proxy) |
|
Set to True if the script makes the remote server to disconnect (ie: install firmware update) |
|
Set to true to disconnect other administrator already connected with modify privilege. |
|
Configuration script to execute |
|
Set the connection and read timeout. |
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: |