Code Monkey home page Code Monkey logo

ansible-dev-templates's Introduction

ansible-dev-templates

Templates for ansible development.

localenv: Supporting code necessary to help provide a Vagrant environment for local development, applicable both to playbooks and roles

role: Files necessary for a role, taken pretty much exactly from ansible-galaxy init

playbook: Files to get started developing a playbook

init.rb: Method to automatically apply templates to a given ditectory

Using init.rb

init.rb simply nondestructively copies the appropriate templates from the directories in this repository to a destination repository.

init.rb destination {playbook|role}

will create a structure for either a role or a playbook in the specified destination directory.

Rebuild a box eg for updates

Let's say you need to update your box, say because kitchen-ansible isn't doing an apt-get update before trying to install things, your box is too old, but a new box hasn't been published by opscode.

In that casse , the box would be called 'opscode-ubuntu-14.04' by default

If you need to create a new box for kitchen, try something like this:

  1. start up the box, kitchen converge. It doesn't matter if it's failing.
  2. kitchen login, sudo and
  3. apt-get remove ansible
  4. apt-get update
  5. apt-get install -y software-properties-common
  6. apt-add-repository ppa:ansible/ansible
  7. apt-get install ansible You should have 1.8.2 now.
  8. cd ./kitchen/kitchen-vagrant/default-ubuntu-1404
  9. vagrant box remove opscode-ubuntu-14.04
  10. Package the box you just started with vagrant package --output sps-ubuntu-1404.box
  11. Add the package in under the old box name.
    vagrant box add --name opscode-ubuntu-14.04 sps-ubuntu-1404.box
  12. kitchen destroy
  13. kitchen converge

You should be converging on the right version of ansible now.

ansible-dev-templates's People

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.