Giter Club home page Giter Club logo

vagrant-ansible's Introduction

Vagrant-ansible

Prerequisites

  • vagrant should be installed on the controller host
  • vagrant-libvirt
  • ruby3 should be installed on the controller host
  • A working libvirtd server

Features

  • Fast box creation with yaml configuration
  • Create multiple vagrant lab environments using the same servers configuration file
  • Multi-machine ansible provisioner deployment
  • Run multiple vagrant provisioners
  • Support assigning pseudostatic ip addresses for vagrant private and management networks through dhcp.

How to use

Standalone

  • Git clone or git fork this project
  • Setup vagrant, libvirtd. There is an example on scripts/vagrant_ansible_setup.sh for debian system on how to do that.
  • Copy servers.yml.dist to settings.yml
  • Copy vagrant-ansible-provision.conf.rb.dist to vagrant-ansible-provision.conf.rb and configure it
  • Run vagrant up

Run as a submodule

  • Add this project as a submodule
  • Run git submodule init'
  • cd vagrant-ansible && create_vagrant_ansible_env.sh
  • cd ../vagrant
  • Configure your labs and servers configuration in ../vagrant folder
  • Add multiple labs by running create_vagrant_ansible_env.sh labname in the vagrant folder
  • Update with git submodule update --recursive --remote

All variables declared in servers.yml can be accessed by ansible variable ANSIBLE_EXTRA_VARS[inventory_hostname]['variable_name'] For example to access the variable is_provisioned which is set to true if the vm is already provisioned you can use ANSIBLE_EXTRA_VARS[inventory_hostname]['is_provisioned'] from your ansible task.

Look in servers.yml.sample for examples of usage. Most of vagrant-libvirt configuration options can be changed in the servers.yml file.

vagrant-ansible's People

Contributors

nickpyrgio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.