$ ansible-doc -t module cisco.sccfm.delete_network_object
> MODULE cisco.sccfm.delete_network_object (sccfm-ansible/plugins/modules/delete_network_object.py)
Delete a network object from your SCC Firewall Manager tenant.
Objects can be deleted by either UID or name.
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 object 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 object 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 object
and resolves it to a UID before deletion.
AUTHOR: Cisco SCCFM Team (@CiscoDevNet)
EXAMPLES:
# Example 1: Delete a network object by UID
- name: Delete network object by UID
cisco.sccfm.delete_network_object:
uid: "abc-123-def-456"
profile: default
# Example 2: Delete a network object by name
- name: Delete network object by name
cisco.sccfm.delete_network_object:
name: "old-web-server"
profile: default
# Example 3: Delete multiple objects using module_defaults
- name: Delete network objects
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
profile: default
tasks:
- name: Delete obsolete network objects
cisco.sccfm.delete_network_object:
name: "{{ item }}"
loop:
- old-server-01
- old-server-02
- deprecated-subnet
# Example 4: Using the default configured profile
- name: Delete a network object
cisco.sccfm.delete_network_object:
name: "temporary-host"
RETURN VALUES:
- deleted_uid The UID of the deleted network object, or null if
already absent.
returned: always
sample: abc-123-def-456
type: str