Skip to content

Instantly share code, notes, and snippets.

View cscutcher's full-sized avatar

Chris Scutcher cscutcher

View GitHub Profile
@cscutcher
cscutcher / 1.generate_dockerignore.py
Last active May 17, 2018 18:37 — forked from wassname/1.generate_dockerignore.py
Convert .gitignore to .dockerignore: quick and dirty.
"""
Convert .gitignore to .dockerignore: quick and dirty.
This is a quick and dirty script to convert this:
`__pycache__/`
Into this:
```
__pycache__
*/__pycache__
@cscutcher
cscutcher / freeipa-dynamic-inventory.py
Last active June 2, 2017 07:27 — forked from devynspencer/freeipa.py
Use FreeIPA hostgroups as a dynamic inventory source for Ansible. Badass.
#!/usr/bin/env python2
"""
Shamelessly stolen from [davynspencer](https://gist.github.com/devynspencer)'s
[gist](https://gist.github.com/devynspencer/2bcca0a7654168ef454f/) with minor
modifications for freeipa 4.4.0
"""
import argparse
import json
from ipalib import api