Ansible and VirtualBox: Great testing couple
Tue, Mar 16, 2021
One-minute read
Making an Ansible playbook to be perfect and rock solid usually means to test playbook many times. Run it again and again while adding a new features, updating an existing and run again. To do it fast and locally it’s quite handy to use Oracle VirtualBox. We can install e.g. Ubuntu LTS Server here and by using snapshots we can roll back after every each ansible playbook run.
Common usage scenario can look like this:
- we install Ubuntu LTS Server
- take a snapshot and name it somehow in VirtualBox
- run ansible playbook
- review what has changed and update playbook accordingly
- restore initial snapshot in VirtualBox, so we can do another playbook run on fresh environment
Want to make a playbook for RedHat server? Just do VirtualBox RedHat installation and run.