Skip to content

Instantly share code, notes, and snippets.

View rdonkin's full-sized avatar

Richard Donkin rdonkin

  • Bath, United Kingdom
View GitHub Profile
@rdonkin
rdonkin / ansible-role-test.sh
Created October 21, 2019 06:20 — forked from brentwg/ansible-role-test.sh
For Posterity. From GeerlingGuy, Ansible Role Test Shim (Some modifications)
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)