Skip to content

amotolani/fmc_collections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 

Repository files navigation

CISCO_FMC Ansible Collection

The Ansible collection includes a variety of Ansible content to help automate Cisco FMC via the FMC API

This collection has been tested against Cisco FMC version 6.3.0.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10,<2.11.

Requirements

This collection relies heavily on the python fmcapi package to interact with the cisco fmc api
Run the below command to install via pip

pip3 install fmcapi

Modules

Name Description
amotolani.cisco_fmc.acp_rule FMC Access Rule Module
amotolani.cisco_fmc.network FMC Network Object Module
amotolani.cisco_fmc.network_group FMC Network Group Object Module
amotolani.cisco_fmc.port FMC Port Object Module
amotolani.cisco_fmc.port_group FMC Port Group Object Module
amotolani.cisco_fmc.vlan FMC VLAN Object Module
amotolani.cisco_fmc.security_zone FMC Security Zone Object Module

Installing this collection

Create a local ansible.cfg and specify the collections_paths configuration to locate the collections. See sample directory structure below

[defaults]
collections_paths = ./

Install the latest version from GitHub

ansible-galaxy collection install git@github.com:amotolani-dev/fmc_collections.git#/amotolani/cisco_fmc

Install from Ansible Galaxy

ansible-galaxy collection install amotolani.cisco_fmc

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: amotolani.cisco_fmc

Using modules from the amotolani.cisco_fmc collection in your playbooks

You can call modules by their Fully Qualified Collection Namespace (FQCN), such as amotolani.cisco_fmc.network. The following example task creates Host fmc objects from a loop and deploys this configuration, using the FQCN:

---
  - name: Create Host objects from a loop
    amotolani.cisco_fmc.network:
        name: "{{item.name}}"
        state: present
        network_type: Host
        fmc: ciscofmc.com
        value: "{{item.value}}"
        username: admin
        password: Cisco1234
        auto_deploy: true
    loop:
        - {name: Host1 , value: 10.10.10.2}
        - {name: Host2 , value: 10.10.10.3}
        - {name: Host2 , value: 10.10.10.4}

See Also:

Contributing to this collection

We are seeking contributions to help improve this collection. If you find problems, or a way to make it better, please open an issue or create a PR against the cisco_fmc collection repository.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release notes

Release notes are available here.

Roadmap

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

Ansible Collections for Cisco FMC API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages