Back to Ansible Reference

$ ansible-doc -t module cisco.sccfm.add_object_override

> MODULE cisco.sccfm.add_object_override (sccfm-ansible/plugins/modules/add_object_override.py)

  Add a device-specific value override to an object in your SCC
  Firewall Manager tenant.
  Overrides allow a shared object to have a different value on a
  specific managed device.
  The object must already be attached to at least one device for
  overrides to apply.
  Supports `NETWORK_OBJECT' and `URL_OBJECT' types.
  The existing `defaultContent' and any existing overrides are
  preserved.

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

= override_value  The literal value for the override. For network
                   objects this 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. For URL objects this should be the
                   URL string.
        type: str

- region  SCCFM region (int, us, eu, apj, au, uae, in, or ci).
        set_via:
          env:
          - name: SCCFM_REGION
        default: null
        type: str

= target_id  UID of the target device for which the override applies.
        type: str

= uid     Unique identifier (UID) of the object to add the override
           to.
        type: str

AUTHOR: Cisco SCCFM Team

EXAMPLES:
# Example 1: Add an override for a specific device
- name: Add network object override for branch office device
  cisco.sccfm.add_object_override:
    uid: "abc-123-def"
    target_id: "70bde3c9-328c-4a4b-bdc9-a4d4042bf09a"
    override_value: "10.10.10.10"
    region: "{{ sccfm_region }}"
    api_token: "{{ sccfm_api_token }}"

# Example 2: Using module_defaults to avoid repeating credentials
- name: Add object overrides
  hosts: localhost
  gather_facts: false
  module_defaults:
    group/cisco.sccfm.all:
      region: "{{ sccfm_region }}"
      api_token: "{{ lookup('env', 'SCCFM_API_TOKEN') }}"
  tasks:
    - name: Override web server IP for branch device
      cisco.sccfm.add_object_override:
        uid: "{{ object_uid }}"
        target_id: "{{ device_uid }}"
        override_value: "192.168.10.100"
      register: override_result

    - name: Show override result
      ansible.builtin.debug:
        var: override_result.object_override

# Example 3: Add overrides for multiple devices in a loop
- name: Add overrides for each branch office device
  cisco.sccfm.add_object_override:
    uid: "{{ shared_object_uid }}"
    target_id: "{{ item.device_uid }}"
    override_value: "{{ item.local_ip }}"
  loop: "{{ branch_offices }}"
  loop_control:
    label: "{{ item.name }}"

RETURN VALUES:

- object_override  The updated object state after the override was
                    added.
        returned: success
        type: dict
        contains:

        - name  Name of the object.
          type: str

        - object_type  Type of the object (e.g., NETWORK_OBJECT,
                        URL_OBJECT).
          type: str

        - overrides_count  Total number of overrides on the object
                            after this operation.
          type: int

        - uid  Unique identifier of the object.
          type: str