项目作者: William-Yeh

项目描述 :
Vagrant Box for Ansible Control Machine.
高级语言: Shell
项目地址: git://github.com/William-Yeh/ansible-vagrantbox.git
创建时间: 2015-10-22T03:15:05Z
项目社区:https://github.com/William-Yeh/ansible-vagrantbox

开源协议:MIT License

下载


Vagrant Box for Ansible Control Machine

Box name

williamyeh/ansible

Included software

Purpose

Ansible control machine is designed to run on Unix. According to official Windows Support document:

Reminder: You Must Have a Linux Control Machine

Note running Ansible from a Windows control machine is NOT a goal of the project. Refrain from asking for this feature, as it limits what technologies, features, and code we can use in the main project in the future. A Linux control machine will be required to manage Windows hosts.*

Cygwin is not supported, so please do not ask questions about Ansible running from Cygwin.*

That said, you may still need to use Windows as the control machine. An easier way is to install Ansible inside a Linux virtual machine, recommended by Jeff Geerling in his Ansible for DevOps book.

What if I don’t want to use the virtual machine approach?

Another way is to use Cygwin, but there may be some strange issues.

Experiment with the following articles at your own risk!

  1. Install a Babun (Cygwin) Shell and Ansible for Windows
  2. ansible-playbook-shim

Build the box yourself

Here are steps you can follow to build the box on your own.

First, install the Packer tool on your host machine.

Second, pull the Bento submodule:

  1. # pull the Bento project
  2. git submodule init
  3. # copy Bento stuff to sub-directories
  4. # since Packer doesn't push soft links to Atlas (defects!)...
  5. ./copy-bento.sh

Third, choose the box directory of your choice:

  1. # change working directory to any specific OS;
  2. # for example, "debian-jessie" (currently the only one)
  3. cd debian-jessie

Now, you can either generate the Vagrant box file on your machine:

  1. # build `ansible-control-machine`:
  2. packer build ansible-control-machine.json
  3. # build `ansible-control-machine`, VirtualBox version only:
  4. packer build -only=virtualbox-iso \
  5. ansible-control-machine.json
  6. # build `ansible-control-machine`, VirtualBox version only,
  7. # with pre-downloaded ISO file from `file:///Volumes/ISO/`:
  8. packer build -only=virtualbox-iso \
  9. -var 'mirror=file:///Volumes/ISO/' \
  10. ansible-control-machine.json

you’ll get an ‘XXX.box’ file in the builds directory, if successful.

Or, you can delegate the building and hosting tasks to Atlas:

  1. # make sure the following environment variables are set:
  2. # ATLAS_TOKEN
  3. # ATLAS_USERNAME
  4. packer push ansible-control-machine.json

License

Licensed under MIT license.

Copyright © 2015-2016 William Yeh - https://github.com/William-Yeh.