This role provide a compliance for install vagrant on your target host.
This role was developed using Ansible 2.5 Backwards compatibility is not guaranteed.
Use ansible-galaxy install diodonfrost.vagrant
to install the role on your system.
This role has multiple variables. The defaults for all these variables are the following:
---
# defaults file for ansible-role-vagrant
# Define Vagrant version to install
# Possible values: https://releases.hashicorp.com/vagrant/index.json
# Default: latest
vagrant_version: latest
# Define urlwhere to download vagrant package
# Default: use local system path defined in Ansible vars/*.yml
vagrant_pkg_url: "{{ __vagrant_pkg_url }}"
# Install Vagrant plugins
vagrant_plugins: []
None
This is a sample playbook file for deploying the Ansible Galaxy vagrant role in a localhost and installing latest Vagrant version.
---
- hosts: localhost
become: true
roles:
- role: diodonfrost.vagrant
This project uses Molecule to aid in the development and testing.
To develop or test you'll need to have installed the following:
- Linux (e.g. Ubuntu)
- Docker
- Python (including python-pip)
- Ansible
- Molecule
- Libvirt (windows tests only)
- Vagrant (windows tests only)
# Install requirements
pip install -r requirements-dev.txt
# Test ansible role with centos 8
molecule test
# Test ansible role with ubuntu 20.04
image=ansible-ubuntu:20.04 molecule test
# Test ansible role with alpine latest
image=ansible-alpine:rolling molecule test
# Create centos 8 instance
molecule create
# Apply role on centos 8 instance
molecule converge
# Launch tests on centos 8 instance
molecule verify
# Test ansible role with Windows
molecule test -s windows
Apache 2
This role was created in 2019 by diodonfrost.