$ ansible-doc -t module cisco.sccfm.delete_network_group
> MODULE cisco.sccfm.delete_network_group (sccfm-ansible/plugins/modules/delete_network_group.py)
Delete a network group object from your SCC Firewall Manager tenant.
Groups can be deleted by either UID or name.
This module is idempotent; deleting a non-existent group returns
changed=false.
OPTIONS (= indicates it is required):
- config_path Optional path to the canonical SCCFM profile
configuration file.
default: null
type: path
- name Name of the network group to delete.
default: null
type: str
- profile Named SCCFM profile configured by `sccfm-cli configure'.
default: default
type: str
- uid Unique identifier (UID) of the network group to delete.
default: null
type: str
NOTES:
* Either `uid' or `name' must be provided, but not both.
* When using `name', the module searches for the group and
resolves it to a UID before deletion.
* Network groups are filtered by objectType to avoid
accidentally matching network objects with the same
name.
AUTHOR: Cisco SCCFM Team (@CiscoDevNet)
EXAMPLES:
# Example 1: Delete a network group by UID
- name: Delete network group by UID
cisco.sccfm.delete_network_group:
uid: "abc-123-def-456"
profile: default
# Example 2: Delete a network group by name
- name: Delete network group by name
cisco.sccfm.delete_network_group:
name: "web-server-group"
profile: default
# Example 3: Delete multiple groups using module_defaults
- name: Delete network groups
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
profile: default
tasks:
- name: Delete obsolete network groups
cisco.sccfm.delete_network_group:
name: "{{ item }}"
loop:
- web-server-group-01
- web-subnet-group
# Example 4: Using the default configured profile
- name: Delete a network group
cisco.sccfm.delete_network_group:
name: "temporary-group"
RETURN VALUES:
- deleted_uid The UID of the deleted network group, or null if
already absent.
returned: always
sample: abc-123-def-456
type: str