Historically, a network consisted of mostly hardware with just a modicum of software involvement. Changing the topology of it involved installing and configuring new switches or blades in a chassis or, at the very least, re-patching some cables. Now, the scenario has changed, and the complex infrastructures built to cater for multi-tenant environments such as cloud hosting, or microservice-based deployments, require a network that is more agile and flexible. This has led to the emergence of Software Defined Networking (SDN), an approach that centralizes the network configuration (where historically it was configured on a per-device basis) and results in network topology being defined as a whole, rather than as a series of component parts. It is, if you like, an abstraction layer for the network itself and thus implies that just like infrastructure as a service, networks can now be defined in code.
Since the last edition of this book was published, a great deal of work has gone into Ansible to make network automation a core proposition. Not only can you now define your infrastructure in an Ansible playbook as we described in the last chapter, but you can define the network supporting it too.
In this chapter, we will explore this area of rapidly growing importance, comprising the following topics:
- Ansible for network management
- Handling multiple device types
- Configuring Cumulus Networks switches with Ansible
- Best practices