Skip to content

Instantly share code, notes, and snippets.

@jchristi
jchristi / shared.py
Created May 24, 2017 20:24
Custom ansible dynamic inventory that allows a directory of variables to be shared across multiple inventories
#!/usr/bin/env python
import os
import six
import argparse
from six.moves import configparser
from ansible.parsing.dataloader import DataLoader
from ansible.inventory import Inventory
var LevelToCPM = {
"1": 0.094,
"1.5": 0.135137432,
"2": 0.16639787,
"2.5": 0.192650919,
"3": 0.21573247,
"3.5": 0.236572661,
"4": 0.25572005,
"4.5": 0.273530381,
"5": 0.29024988,
@jchristi
jchristi / config.pp
Created February 25, 2014 19:02
Puppetization of a Jenkins config file
################################################################################
# Definition: jenkins::config
#
# This class create a new jenkins config file in the main jenkins directory
#
################################################################################
define jenkins::config(
$content,
$config = $title,
) {