Book Image

Network Automation Cookbook

By : Okasha
Book Image

Network Automation Cookbook

By: Okasha

Overview of this book

Network Automation Cookbook is designed to help system administrators, network engineers, and infrastructure automation engineers to centrally manage switches, routers, and other devices in their organization's network. This book will help you gain hands-on experience in automating enterprise networks and take you through core network automation techniques using the latest version of Ansible and Python. With the help of practical recipes, you'll learn how to build a network infrastructure that can be easily managed and updated as it scales through a large number of devices. You'll also cover topics related to security automation and get to grips with essential techniques to maintain network robustness. As you make progress, the book will show you how to automate networks on public cloud providers such as AWS, Google Cloud Platform, and Azure. Finally, you will get up and running with Ansible 2.9 and discover troubleshooting techniques and network automation best practices. By the end of this book, you'll be able to use Ansible to automate modern network devices and integrate third-party tools such as NAPALM, NetBox, and Batfish easily to build robust network automation solutions.
Table of Contents (15 chapters)

What this book covers

Chapter 1, Building Blocks of Ansible, focuses on how to install Ansible and describes the main building blocks of Ansible and how to utilize them to build advanced Ansible playbooks.

Chapter 2, Managing Cisco IOS Devices Using Ansible, focuses on how to integrate Ansible with Cisco IOS devices and how to use Ansible to configure Cisco IOS devices. We will explore the core Ansible modules developed to interact with Cisco IOS devices. Finally, we will explore how to use the Cisco PyATS library and how to integrate it with Ansible in order to validate the network state on Cisco IOS and Cisco IOS-XE devices.

Chapter 3, Automating Juniper Devices in the Service Providers Using Ansible, describes how to integrate Ansible with Juniper devices in Service Provider (SP) environments and how to manage the configuration of Juniper devices using Ansible. We will explore how to use the core Ansible modules developed to manage Juniper devices. Furthermore, we will explore the PyEZ library, which is used by Juniper custom Ansible modules to extend Ansible functionality in managing Juniper devices.

Chapter 4, Building Data Center Networks with Arista and Ansible, outlines how to integrate Ansible with Arista devices to build data center fabrics using EVPN/VXLANs. We will explore how to use the core Ansible modules developed to manage Arista devices and how to use these modules to configure and validate the network state on Arista switches.

Chapter 5, Automating Application Delivery with F5 LTM and Ansible, focuses on how to integrate Ansible with F5 BIG-IP LTM devices to onboard new BIG-IP LTM devices and how to set up the BIG-IP system as a reverse proxy for application delivery.

Chapter 6, Administering Multi-Vendor Network with NAPALM and Ansible, introduces the NAPALM library and outlines how to integrate this library with Ansible. We will explore how to utilize Ansible and NAPALM to simplify the management of multi-vendor environments.

Chapter 7, Deploying and Operating AWS Networking Resources with Ansible, outlines how to integrate Ansible with your AWS environment and how to describe your AWS infrastructure using Ansible. We explore how to utilize the core Ansible AWS modules to manage networking resources in AWS in order to build your AWS network infrastructure using Ansible.

Chapter 8, Deploying and Operating Azure Networking Resources with Ansible, outlines how to integrate Ansible with your Azure environment and how to describe your Azure infrastructure using Ansible. We will explore how to utilize the core Ansible Azure modules to manage networking resources in Azure in order to build Azure network solutions using Ansible.

Chapter 9, Deploying and Operating GCP Networking Resources with Ansible, describes how to integrate Ansible with your GCP environment and how to describe your GCP infrastructure using Ansible. We explore how to utilize the core Ansible GCP modules to manage networking resources in GCP in order to build GCP network solutions using Ansible.

Chapter 10, Network Validation with Batfish and Ansible, introduces the Batfish framework for offline network validation and how to integrate this framework with Ansible in order to perform offline network validation using both Ansible and Batfish.

Chapter 11, Building a Network Inventory with Ansible and NetBox, introduces NetBox, which is a complete inventory system to document and describe any network. We outline how to integrate Ansible with NetBox and how to use NetBox data to build Ansible dynamic inventories.

Chapter 12, Simplifying Automation with AWX and Ansible, introduces the AWX project, which extends Ansible and provides a powerful GUI and API on top of Ansible to simplify running automation tasks within an organization. We outline the extra features provided by AWX and how to use it to manage network automation within an organization.

Chapter 13, Advanced Techniques and Best Practices for Ansible, describes various best practices and advanced techniques that can be used for more advanced playbooks.