Skip to content

Instantly share code, notes, and snippets.

View boldandbusted's full-sized avatar
:shipit:
ATP recycling

Jesse Adelman boldandbusted

:shipit:
ATP recycling
View GitHub Profile
@lorin
lorin / vagrant.py
Created September 25, 2014 21:25
Vagrant dynamic inventory script for Ansible
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys
@gmr
gmr / 0-auto-manged-chef-repo.md
Last active February 8, 2018 22:45
This gist has files that are used to automate chef repository submodules used for roles, data bags, cookbooks and environments, ultimately uploading the maintained chef repository to chef via knife using Jenkins and Github.

The files in this gist are for having Jenkins automatically manage a chef repository using git submodules. This allows for clean, clutter free management of individual cookbooks, and individual respositories for roles, environments and data bags in our chef-repo.

The process relies on using Github (we use Github Enterprise) and Jenkins in combination with the Jenkins Github plugin to notify Jenkins when a repository has changed.

Our chef-repo directory looks something like:

chef-repo
    - cookbooks
          - Each cookbook is a git submodule managed by Jenkins
    - data_bags (git submodule managed by Jenkins)