amotolani.cisco_fmc.network_group (1.1.5) — module

Create, Modify and Delete Cisco FMC network objects

Authors: Adelowo David (@amotolani)

Install collection

Install with ansible-galaxy collection install amotolani.cisco_fmc:==1.1.5


Add to requirements.yml

  collections:
    - name: amotolani.cisco_fmc
      version: 1.1.5

Description

Create, Modify and Delete Cisco FMC network objects.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Network Group with existing network objects and deploy changes
  amotolani.cisco_fmc.network_group:
    name: Network-Group-1
    state: present
    fmc: cisco.sample.com
    action: add
    username: admin
    password: Cisco1234
    auto_deploy: True
    group_objects: MySampleHost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete Network Group
  amotolani.cisco_fmc.network_group:
    name: Network-Group-1
    state: absent
    fmc: cisco.sample.com
    username: admin
    password: Cisco1234
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Network Group specifying network addresses than are not cisco_fmc objects
  amotolani.cisco_fmc.network_group:
    name: Network-Group-2
    state: present
    fmc: cisco.sample.com
    action: add
    username: admin
    password: Cisco1234
    group_literals: 20.1.2.2,10.32.11.0/24,34.2.2.1-34.2.2.200
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove address and network object from Network Group
  amotolani.cisco_fmc.network_group:
    name: Network-Group-2
    state: present
    fmc: cisco.sample.com
    action: remove
    username: admin
    password: Cisco1234
    group_literals: 20.1.2.2
    group_objects: MySampleHost

Inputs

    
fmc:
    description:
    - IP address or FQDN of Cisco FMC.
    required: true
    type: str

name:
    description:
    - The name of the cisco_fmc object to be created, modified or deleted.
    required: true
    type: str

state:
    description:
    - Whether to create/modify (C(present)), or remove (C(absent)) an object.
    required: true
    type: str

action:
    description:
    - Action to take with the specified group members
    - Allowed values are (C(add)) or (C(remove))
    - Required when state = "present"
    required: false
    type: str

password:
    description:
    - Cisco FMC Password
    required: true
    type: str

username:
    description:
    - Cisco FMC Username
    - User should have sufficient permissions to modify objects
    required: true
    type: str

auto_deploy:
    default: false
    description:
    - Option to deploy configurations to deployable devices after changes
    required: false
    type: bool

group_objects:
    description:
    - FMC Objects to be added to/removed from the network group
    - If the objects do not exist on the FMC, this will be ignored
    required: false
    type: list

group_literals:
    description:
    - Network to be added to the network group
    - Accepted value is a list of valid IPv4 addresses,IPv4 address ranges or IPv4 network
      addresses
    required: false
    type: list