Skip to content

Instantly share code, notes, and snippets.

View hinchliff's full-sized avatar

Alan Hinchliff hinchliff

View GitHub Profile
This file has been truncated, but you can view the full file.
# python3 -m pip install -vv --no-cache-dir ansible==2.10.5
Using pip 21.0 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-h9isolvo
Created temporary directory: /tmp/pip-req-tracker-1nbbe2nv
Initialized build tracking at /tmp/pip-req-tracker-1nbbe2nv
Created build tracker: /tmp/pip-req-tracker-1nbbe2nv
Entered build tracker: /tmp/pip-req-tracker-1nbbe2nv
Created temporary directory: /tmp/pip-install-m1i1i89w
@hinchliff
hinchliff / c7n_run.py
Created April 19, 2019 12:31
Run a Cloud Custodian policy file from a Python script. Most useful perhaps to be able to run Cloud Custodian from AWS Lambda.
import os
import logging
from c7n.commands import run
from c7n.config import Config
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# Capture our current directory
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
#!/bin/bash
# Initial sections copied from Accumulo recipe:
# https://github.com/RENCI-NRIG/exogeni-recipes/tree/master/accumulo/accumulo_exogeni_postboot.txt
############################################################
# Hadoop
############################################################
HADOOP_VERSION=hadoop-2.7.3