• Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Ansible Testing Framework for Humans

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.

Usage

usage: ansible-test [-h] [--image IMAGE] [--family {Debian,RedHat,Gentoo}]
                    role

positional arguments:
  role                  Role to test

optional arguments:
  -h, --help            show this help message and exit
  --image IMAGE, -i IMAGE
                        Docker Base Image
  --family {Debian,RedHat,Gentoo}, -f {Debian,RedHat,Gentoo}
                        ansible_os_family value for Base Image

Tested image/family combinations:

image debian:7.7 / family Debian <-- default values if not specified
image centos:centos7.2.1511 / family RedHat
image gentoo-amd64-plus-portage / family Gentoo

Gentoo notes

Rather than being able to simply pull official gentoo docker images, it was necessary to merge the stage3 and portage images to work around a docker limitation: docker currently has no way to mount volumes while building an image, only when starting up a container from an already-built image (see moby/moby#3949 for further discussion of this limitation).

See base-images/Dockerfile.gentoo-amd64-portage as example for creating base image for testing on Gentoo. This Dockerfile inherits from gentoo/stage3-amd64 Dockerfile and adds the commands from gentoo/portage Dockerfile in order to create a full stage3 image with /usr/portage included rather than relying on a separage image containing a portage volume.

More Repositories

1

nylas-mail

๐Ÿ’Œ An extensible desktop mail app built on the modern web. Forks welcome!
JavaScript
24,808
star
2

sync-engine

๐Ÿ“จ IMAP/SMTP sync system with modern APIs
Python
3,503
star
3

nylas-perftools

Distributed profiling on the cheap
JavaScript
561
star
4

make-deb

Tool for building debian packages from your python projects
Python
295
star
5

inbox-ios

Inbox.framework for iOS and related examples, sample code, and documentation
Objective-C
183
star
6

component-store-example

An example of the topics covered in Building for Plugins with React & Flux
CoffeeScript
180
star
7

nylas-nodejs

A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
TypeScript
169
star
8

inbox.js

Client-side SDK for communicating with the InboxApp API
JavaScript
141
star
9

inbox-scaffold-html5

The Inbox HTML5 App Scaffold - a foundation for building great mail apps.
CoffeeScript
127
star
10

nylas-mail-theme-starter

A basic starter for any theme you want to create for N1.
CSS
101
star
11

nylas-python

Python bindings for the Nylas Platform API
Python
101
star
12

nylas-ruby

Ruby bindings for the Nylas Platform APIs
Ruby
101
star
13

inbox-scaffold-ios

iOS App Scaffold
JavaScript
100
star
14

components

UI building blocks to add email, calendar, and contacts to your app in minutes.
Svelte
90
star
15

electroplate

Automatic desktop integrated webapps via Electron
JavaScript
77
star
16

exchangelib

Python client for Microsoft Exchange Web Services (EWS)
Python
67
star
17

N1-Markdown-Composer

An N1 plugin to write emails using markdown
CoffeeScript
65
star
18

nylas-java

Nylas Java SDK
Kotlin
30
star
19

sync-engine-docker

[deprecated] Utilities to run the sync engine under Docker
Shell
25
star
20

mypy-tools

A handful of tools for using mypy
Python
24
star
21

ansible-flask-example

Example using ansible-test and wrapper roles to implement a simple flask webapp
Python
24
star
22

electron-RxDB

RxDB is a high-performance, observable object store built on top of SQLite & intended for database-driven Electron applications.
JavaScript
24
star
23

build-dpkg-buster

GitHub Action for building Debian packages on Buster
Dockerfile
19
star
24

nylas-production-python

Utilities for running Python code in production
Python
18
star
25

nylas-php

PHP
18
star
26

imap-provider-settings

Common IMAP provider settings
JavaScript
15
star
27

scheduler-examples

Example code for the Nylas Scheduler
HTML
15
star
28

inbox-zero

Automate Your Way to Inbox Zero With Nylas
JavaScript
11
star
29

flask-statsd

Flask Extension for statsd integration
Python
8
star
30

use-cases

Explore Nylas API through demo apps with your preferred backend and frontend frameworks.
JavaScript
8
star
31

nodejs-sample-process-all-mail

An example of a NodeJS application that processes all existing and incoming email messages in connected accounts.
JavaScript
6
star
32

paper-reading-group

CSS
6
star
33

nylas-api-demo

An example application that consumes the Nylas API.
JavaScript
5
star
34

slackbot

scheduler slack bot tutorial
Shell
5
star
35

nylas-mail-docs

Docs for the Nylas Mail project
5
star
36

tessera-up

Dashboard generator for Tessera
Python
3
star
37

imapclient-unparented

Python
3
star
38

build-dpkg-stretch

GitHub Action for building Debian packages on Stretch
Dockerfile
3
star
39

caldav

clone of hg repo for PyPI caldav
Python
2
star
40

webhooks-server

This is a small repo on how to create webhooks-server for you Nylas applications in the cloud (Heroku)
JavaScript
2
star
41

nylas-js

JavaScript SDK for the Nylas Platform API
TypeScript
1
star
42

.github

1
star
43

homebrew-nylas-cli

Ruby
1
star
44

data-streams-looker-block

Testing looker blocks
LookML
1
star
45

uprocket-demo

UpRocket Demo of Nylas Scheduler v3
TypeScript
1
star