Interacting with a network device
As already mentioned at the start of the chapter, we are going to use Vagrant to launch a network device, and then run a playbook to apply a basic configuration. The device we will be launching is a VyOS. While the device will be a full VyOS installation, we will be applying only a test configuration to give you an idea of how the modules we mentioned in the previous section can be used.
Note
There is a full copy of this playbook in the GitHub repository that accompanies this title.
Launching the network device
To do this, we are going to use a VyOS Vagrant box. If you are following along, we first need to create a folder called vyos
. This will hold our playbook and Vagrantfile
. To create the folder structure and blank files needed for the playbook, run the following commands:
$ mkdir vyos vyos/group_vars vyos/roles $ ansible-galaxy init vyos/roles/vyos-firewall $ touch vyos/Vagrantfile $ touch vyos/production $ touch vyos/site.yml $ touch vyos/group_vars/common...