$ ansible-doc -t module cisco.sccfm.clear_asa_shun
> MODULE cisco.sccfm.clear_asa_shun (sccfm-ansible/plugins/modules/clear_asa_shun.py)
Clears all active shun entries and resets shun statistics on one or
more ASA devices managed by SCC Firewall Manager.
Executes `clear shun' on the target devices.
Devices can be selected by a Lucene query or by specifying a list of
UIDs.
See
https://developer.cisco.com/docs/cisco-security-cloud-control-firewall-manager/execute-cli-command/
for API documentation.
OPTIONS (= indicates it is required):
- api_token API token for SCCFM.
set_via:
env:
- name: SCCFM_API_TOKEN
default: null
no_log: true
type: str
- limit Maximum number of devices to return when using `query'.
Ignored when using `uids'.
default: 50
type: int
- offset Pagination offset when using `query'.
Ignored when using `uids'.
default: 0
type: int
- query Lucene query to filter ASA devices.
Mutually exclusive with `uids'.
The query is automatically combined with `deviceType:ASA'.
default: null
type: str
- region SCCFM region (int, us, eu, apj, au, uae, in, or ci).
set_via:
env:
- name: SCCFM_REGION
default: null
type: str
- uids List of device UIDs to clear shuns on.
Mutually exclusive with `query'.
default: null
elements: str
type: list
AUTHOR: Cisco SCCFM Team
EXAMPLES:
# Example 1: Clear all shuns on devices matching a query
- name: Clear all shuns on production ASAs
cisco.sccfm.clear_asa_shun:
query: "name:prod-* AND connectivityState:ONLINE"
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
# Example 2: Clear shuns on specific devices by UID
- name: Clear shuns on specific ASA
cisco.sccfm.clear_asa_shun:
uids:
- "12345678-1234-1234-1234-123456789abc"
# Example 3: Using module_defaults (recommended)
- name: Clear shun entries
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
tasks:
- name: Clear all shuns on online ASAs
cisco.sccfm.clear_asa_shun:
query: "connectivityState:ONLINE"
RETURN VALUES:
- results List of CLI execution results per device.
elements: dict
returned: success
type: list
contains:
- device_uid The UID of the device.
type: str
- error_msg Error message if execution failed on this device
(None if successful).
type: str
- result The CLI command output.
type: str
- script The script that was executed.
type: str