Running the playbook

To launch the Vagrant box, make sure you are in the vyos folder we created at the start of this section and run one of the following two commands to start the box with your chosen hypervisor:

$ vagrant up$ vagrant up --provider=vmware_fusion

Once your Vagrant box has launched, you can run the playbook using the following command:

$ ansible-playbook -i production site.yml

The output for this playbook run should look something like the following:

PLAY [localhost] ***********************************************************************************TASK [roles/vyos-firewall : set the hostname correctly] ********************************************changed: [localhost]TASK [roles/vyos-firewall : configure name servers] ************************************************ ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.