Git Product home page Git Product logo

ansible-test's Introduction

ansible-test: Ansible Local Testing Framework

Ansible-test is a tool for testing your automation on local docker images. You can think of this as a slim version of Chef's test-kitchen.

$ cd /my/ansible/repository
$ ansible-test my_ansible_role

The above command will drop a Dockerfile at the root of your ansible repo and initialize a docker image with ansible installed. It will then run the ansible role "my_ansible_role".

Note that ansible-test also accepts arbitrary arguments. These arguments will be passed on to the ansible-playbook command while running tests:

ansible-test my_ansible_role --ask-vault-pass

Ansible test also accepts an image argument to specify the base docker image:

ansible-test my_ansible_role --image ubuntu:latest

See the example ansible flask project, which tests with ansible-test out-of-the-box

Installation

To install ansible-test:

$ pip install ansible-test

Documentation

ansible-test requires that you have docker installed locally. If you are using Mac OSX, I recommend you use boot2docker.

NOTE: Given docker's inflexibility with Dockerfiles, ansible-test will overwrite the Dockerfile in the current working directory from which you run ansible-test. This is currently the simplest way to integrate docker as a testing tool.

ansible-test's People

Contributors

spang avatar grinich avatar sjlc avatar woohgit avatar lowks avatar rcoh avatar

Watchers

Dimitri Grinkevich 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.