Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geerlingguy/ansible-role-test-vms
DEPRECATED - A Vagrant configuration to test Ansible roles against a variety of Linux distributions.
https://github.com/geerlingguy/ansible-role-test-vms
ansible centos fusion test ubuntu vagrant virtualbox vms vmware
Last synced: 7 days ago
JSON representation
DEPRECATED - A Vagrant configuration to test Ansible roles against a variety of Linux distributions.
- Host: GitHub
- URL: https://github.com/geerlingguy/ansible-role-test-vms
- Owner: geerlingguy
- License: mit
- Created: 2015-01-23T16:38:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T18:02:52.000Z (about 6 years ago)
- Last Synced: 2024-10-10T04:06:31.572Z (25 days ago)
- Topics: ansible, centos, fusion, test, ubuntu, vagrant, virtualbox, vms, vmware
- Homepage:
- Size: 9.77 KB
- Stars: 40
- Watchers: 4
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list-ansible - ansible-role-test-vms - A Vagrant configuration to test Ansible roles against a variety of Linux distributions. (vmware)
README
# (DEPRECATED) Multi-Platform Ansible Role and Playbook Test VMs
> **Deprecation Notice**: I no longer maintain this repository. Please see my book, [Ansible for DevOps](https://www.ansiblefordevops.com), for more suggestions for local development and testing of Ansible roles and playbooks.
I maintain [hundreds of roles](https://galaxy.ansible.com/geerlingguy) on Ansible Galaxy, and dozens more locally. Since I run both CentOS (a RedHat derivative) and Ubuntu/Debian-based servers, I like to have a reliable platform to test my roles and playbooks everywhere with minimal effort.
On GitHub, I generally use Travis CI to run a minimal set of tests against the Travis CI environment (currently Ubuntu 12.04). I wrote about this setup on the Server Check.in Blog: [Testing Ansible Roles with Travis CI on GitHub](https://servercheck.in/blog/testing-ansible-roles-travis-ci-github). It's impossible to bootstrap extra test VMs inside the Travis environment due to Travis' use of OpenVZ. Thus, to run Ansible playbooks against CentOS and other versions of Ubuntu, I have to rely on a local configuration.
For this, I use Vagrant and some VirtualBox boxes that I build to follow the latest releases of the OSes I support. Currently, you can find the boxes I use on [Atlas](https://atlas.hashicorp.com/geerlingguy) (they are hosted at [files.midwesternmac.com](http://files.midwesternmac.com/)), and this project runs a playbook against the following OSes:
- Ubuntu 12.04.x (192.168.3.4)
- Ubuntu 14.04.x (192.168.3.3)
- Ubuntu 16.04.x (192.168.3.2)
- CentOS 6.x (192.168.3.6)
- CentOS 7.x (192.168.3.5)The project is extremely simple, and simply requires [Vagrant](https://www.vagrantup.com/), [VirtualBox](https://www.virtualbox.org/), and [Ansible](http://docs.ansible.com/intro_installation.html) to be installed on your host machine.
## Testing a Role
To test a role, the role must be installed on your host machine (you can install galaxy roles via `$ ansible-galaxy install [rolename]`, but this project is more focused on testing roles you'd be working on locally). Just add the role to `playbook.yml` and run `vagrant up`.
It should take a few minutes to download each of the base boxes the first time, but after that, it takes about a minute to boot each VM, then run the playbook with your role(s).
After testing a role, you can destroy the four VMs with `vagrant destroy -f`. You can also just build one particular VM with `vagrant up ubuntu1204` (as an example), or re-run the ansible playbook with `vagrant provision ubuntu1204`.
## License
MIT
## Author Information
Created in 2014 by [Jeff Geerling](http://jeffgeerling.com/), author of [Ansible for DevOps](http://ansiblefordevops.com/).