$ ansible-doc -t module cisco.sccfm.update_network_group
> MODULE cisco.sccfm.update_network_group (sccfm-ansible/plugins/modules/update_network_group.py)
Update a network group in your SCC Firewall Manager tenant.
The group can be identified by `uid' or `name' (exactly one
required).
Only fields that differ from the current state are sent, making the
module idempotent.
Returns `changed=False' when the group already matches the desired
state.
Literal updates (network_literals, url_literals) are not supported
for updates.
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
- description New description for the network group.
default: null
type: str
- labels New list of labels for the network group.
default: null
elements: str
type: list
- name Name of the network group to update (alternative to `uid').
Used to look up the group by name.
default: null
type: str
- new_name New name for the network group (rename).
default: null
type: str
- referenced_objects List of existing network object names or UIDs
to include in the group. Names are resolved to
UIDs automatically. Replaces all existing
referenced objects.
default: null
elements: str
type: list
- region SCCFM region (int, us, eu, apj, au, uae, in, or ci).
set_via:
env:
- name: SCCFM_REGION
default: null
type: str
- tags New mapping of tag keys to lists of tag values. For
example, `{"environment": ["production", "staging"]}'.
default: null
type: dict
- uid Unique identifier (UID) of the network group to update.
default: null
type: str
AUTHOR: Cisco SCCFM Team
EXAMPLES:
# Example 1: Update referenced objects by name
- name: Update network group members
cisco.sccfm.update_network_group:
name: web-servers
referenced_objects:
- web-server-01
- web-server-02
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
# Example 2: Rename a group and update description using module_defaults
- name: Update network groups
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
region: "{{ sccfm_region }}"
api_token: "{{ lookup('env', 'SCCFM_API_TOKEN') }}"
tasks:
- name: Rename and update group
cisco.sccfm.update_network_group:
name: web-servers
new_name: web-tier
description: "Updated web tier group"
tags:
environment:
- production
# Example 3: Idempotent update (no change if already matching)
- name: Ensure group has correct description
cisco.sccfm.update_network_group:
name: app-tier
description: "Application tier group"
register: result
- name: Show whether a change was made
ansible.builtin.debug:
msg: "Changed: {{ result.changed }}"
RETURN VALUES:
- network_group The updated network group, or current state if
unchanged.
Returned keys include `uid', `name', `description',
`elements', `labels', `tags', `object_type',
`literals', and `referenced_object_uids'.
returned: success
type: dict
contains:
- labels Labels attached to the group.
type: list
- literals Literal values in the group.
type: list
- name Name of the network group.
type: str
- object_type Type of the object.
type: str
- referenced_object_uids UIDs of referenced objects in the
group.
type: list
- tags Tags attached to the group.
type: dict
- uid Unique identifier of the network group.
type: str