Network Fact Gathering & Reporting - Solution Guide

Updated

Overview

Every automation journey begins by exploring a few simple automated tasks. In this use case, we'll walk through a simple network automation use case to help you gather facts about your network which can be exported for compliance reporting. For purposes of this article, we will be demonstrating the automation of Cisco IOS devices, but this automation could easily be applied to Arista, Juniper or other network components supported by various Ansible Content Collections.

Operational impact: None

Business value drivers

  • Increased productivity
  • Support for compliance

Technical value drivers

  • Increased network visibility
  • Simplified compliance reporting

Recommended demo and self-paced labs:

Prerequisites


This solutions guide assumes a working knowledge of YAML, Ansible Playbooks, the Ansible VS Code extension, execution environments, Ansible navigator, and Git. If you are new to Ansible Automation Platform, we strongly recommend the [free Red Hat technical overview course](https://www.redhat.com/en/services/training/do007-ansible-essentials-simplicity-automation-technical-overview) or these learning paths:

The Ansible Content Collections referenced in this guide can be found in the This content is not included.Red Hat Hybrid Cloud Console, which is available to current subscribers. Not currently an Ansible Automation Platform customer? Sign up for a This content is not included.free 60-day trial.

Featured Ansible Content Collections

Ansible / Ansible Automation Platform features used

  • Ansible Playbooks
  • Ansible builder / execution environments
  • Ansible navigator
  • Automation hub
  • Automation job templates

Other:

  • Github

Step 1: Network fact gathering

---
- name: Gather information from routers
  hosts: cisco
  gather_facts: yes
  tasks:
    - name: Gather router facts
      cisco.ios.ios_facts:
      register: cisco_facts
    
    - name: Display router facts
      ansible.builtin.debug:
        var: cisco_facts
  • Create a job template using your project. Save your job template as Network configuration update, then select Launch to run the template.
 Gather router facts
Gather router facts job template

Step 2: Export network facts to a report or create dynamic documentation

 Network report
Network report

Next Steps:

Article Type