$ ansible-doc -t module cisco.sccfm.list_access_rules
> MODULE cisco.sccfm.list_access_rules (sccfm-ansible/plugins/modules/list_access_rules.py)
List ASA access rules from your SCC Firewall Manager tenant.
Supports pagination via `limit' and `offset'.
Supports Lucene query filtering via `query'.
OPTIONS (= indicates it is required):
- config_path Optional path to the canonical SCCFM profile
configuration file.
default: null
type: path
- limit Maximum number of results to return.
default: 50
type: int
- offset Pagination offset (number of results to skip).
default: 0
type: int
- profile Named SCCFM profile configured by `sccfm-cli configure'.
default: default
type: str
- query Optional Lucene query string to filter results.
default: null
type: str
AUTHOR: Cisco SCCFM Team (@CiscoDevNet)
EXAMPLES:
# Example 1: List all access rules
- name: List all access rules
cisco.sccfm.list_access_rules:
profile: default
register: result
- name: Display access rules
ansible.builtin.debug:
var: result.access_rules
# Example 2: Search with pagination using module_defaults
- name: List access rules
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
profile: default
tasks:
- name: List first page of access rules
cisco.sccfm.list_access_rules:
limit: 10
offset: 0
register: result
- name: Show count
ansible.builtin.debug:
msg: "Found {{ result.count }} rules"
RETURN VALUES:
- access_rules List of access rules returned by the API.
elements: dict
returned: success
type: list
contains:
- destination_network Destination network details.
type: dict
- index Position in the rule list.
type: int
- rule_action PERMIT or DENY.
type: str
- source_network Source network details.
type: dict
- uid Unique identifier of the access rule.
type: str
- count Total number of matching access rules.
returned: success
type: int
- limit The limit used in the request.
returned: success
type: int
- offset The offset used in the request.
returned: success
type: int