Navigation Menu

Skip to content

dresden-weekly/vagrant-ansible-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant Ansible Remote

A collection of common scripts used to run Ansible everywhere

Mission statement

  • Should work for Windows, Mac and Linux systems.
    • Windows cannot run Ansible nativly.
  • Tie the Ansible version/installation method to the project
  • Make Testing with Vagrant easy

Solution

This project contains a set of generic and very configurable scripts that help with all these steps.

Your project simply contains a "remote"-script. This script is very will install the right version of Ansible where you want it. It will also launch Vagrant virtual machine or use Docker if necessary.

Prerequisites

  1. Vagrant

  2. Vagrant HostManager-Plugin

    vagrant plugin install vagrant-hostmanager
    

or

  1. Docker
    • On Windows ensure that you mount without execution rights. Add 'umask=22,fmask=111' to automount options in wsl$://etc/wsl.cnf. See blogpost.

Project Creation

  1. Copy the contents of template/ into a new folder

    cp -R $vagrant-ansible-remote/template .
  2. Add this repository as git-submodule

    git submodule add https://github.com/dresden-weekly/vagrant-ansible-remote
  3. Configure and adapt

    • look at the copied files
    • create a .remote.xy from the given examples if necessary
  4. Test your project setup with vagrant

    # bash
    ./remote.sh
    :: cmd
    remote
  5. Have fun!

Using Remote script

argument schema:

remote [options]* [hosts]? [playbook]* [extra args]*

Simply calling

remote

equals:

remote default provision

More examples:

:: provision staging server
remote staging provision

:: deploying release to staging server
remote staging deploy

:: import dump from an archive
remote staging import_dump dumps/archive.tar.gz

License

The MIT License (MIT)

Copyright (c) 2015 dresden-weekly

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Scripts to install and run ansible to provision any machines and allow development with vagrant

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published