Skip to content

Instantly share code, notes, and snippets.

View markahesketh's full-sized avatar
🚀

Mark Hesketh markahesketh

🚀
View GitHub Profile
@markahesketh
markahesketh / ansible-role-test.sh
Created October 12, 2017 19:57 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/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)
/**
* Custom chart
*/
Chart.types.Doughnut.extend({
name: "PtgDoughnut",
// Check if we need to extend the scale
initialize: function(data){
this.options.onAnimationProgress = function(easeDecimal){
this.drawPercentage((easeDecimal * this.segments[0].value).toFixed(1));