$ ansible-doc -t module cisco.sccfm.update_network_object
> MODULE cisco.sccfm.update_network_object (sccfm-ansible/plugins/modules/update_network_object.py)
Update a network object in your SCC Firewall Manager tenant.
The object 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 object already matches the desired
state.
OPTIONS (= indicates it is required):
- config_path Optional path to the canonical SCCFM profile
configuration file.
default: null
type: path
- description New description for the network object.
default: null
type: str
- labels New list of labels for the network object.
default: null
elements: str
type: list
- name Name of the network object to update (alternative to
`uid'). Used to look up the object by name.
default: null
type: str
- new_name New name for the network object (rename).
default: null
type: str
- profile Named SCCFM profile configured by `sccfm-cli configure'.
default: default
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 object to update.
default: null
type: str
- value New literal value of the network object. Can be an IP
address (e.g., `10.0.0.1'), a CIDR subnet (e.g.,
`10.0.0.0/24'), or an IP range (e.g.,
`10.0.0.1-10.0.0.10').
default: null
type: str
AUTHOR: Cisco SCCFM Team (@CiscoDevNet)
EXAMPLES:
# Example 1: Update a network object's value by UID
- name: Update network object value
cisco.sccfm.update_network_object:
uid: "abc-123-def"
value: "192.168.1.0/24"
profile: default
# Example 2: Rename a network object by name
- name: Rename a network object
cisco.sccfm.update_network_object:
name: old-object-name
new_name: new-object-name
profile: default
# Example 3: Update multiple fields using module_defaults
- name: Update network objects
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
profile: default
tasks:
- name: Update web server object
cisco.sccfm.update_network_object:
name: web-server-01
value: "10.0.1.200"
description: "Updated web server IP"
labels:
- production
- web
tags:
environment:
- production
# Example 4: Idempotent update (no change if already matching)
- name: Ensure network object has correct value
cisco.sccfm.update_network_object:
name: web-server-01
value: "10.0.1.100"
register: result
- name: Show whether a change was made
ansible.builtin.debug:
msg: "Changed: {{ result.changed }}"
RETURN VALUES:
- network_object The updated network object, or current state if
unchanged.
Returned keys include `uid', `name', `description',
`elements', `labels', `tags', `object_type', and
`literal'.
returned: success
type: dict
contains:
- labels Labels attached to the object.
type: list
- literal Literal value of the network object.
type: str
- name Name of the network object.
type: str
- object_type Type of the object.
type: str
- tags Tags attached to the object.
type: dict
- uid Unique identifier of the network object.
type: str