GithubHelp home page GithubHelp logo

ch1aki / ansible-test-kitchen-exmaple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from noqcks/ansible-test-kitchen-example

0.0 2.0 0.0 10 KB

Explaining how to use test kitchen with ansible roles

Ruby 100.00%

ansible-test-kitchen-exmaple's Introduction

Ansible Test Kitchen Example

Build Status

We can use test-kitchen with inspec to run some basic tests for our ansible roles.

Test kitchen allows us to do the following

1. spin up docker container
2. provision container using ansible role
3. test that our ansible role did everything we wanted it to

The files contained in this repo should be enough to get you easily started with testing ansible roles using serverspec.

0. requirements.yml

This are the dependencies listed in meta/main of your ansible role. If there are no dependecies, remove requirements_path: from .kitchen.yml

1. .travis.yml

Describes how to run everything on travis-ci. If you are not using travis-ci, you can omit this file.

2. .kitchen.yml

Describes what to run our serverspec tests on (docker, vagrant, ec2), and how to provision our hosts.

3. /test/integration/default/default.yml

This is the ansible playbook we run to provision our hosts. The most basic function is just installing our ansible role on the host machine.

4. /test/integration/default/default_spec.rb

This is the inspec file that contains the tests to run against our hosts. For resource types see the documentation.

ansible-test-kitchen-exmaple's People

Contributors

ch1aki avatar extremelylongusername avatar noqcks avatar

Watchers

 avatar  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.