Skip to content

Instantly share code, notes, and snippets.

View 1davidmichael's full-sized avatar

David Michael 1davidmichael

View GitHub Profile
#!/bin/sh
SEARCH=$1
for vault in $(grep -Rl ANSIBLE_VAULT .); do
ansible-vault decrypt --output=- $vault | grep ${SEARCH} | sed -e "s~^~${vault}: ~"
done
@1davidmichael
1davidmichael / describe_instances.py
Created May 20, 2019 18:40 — forked from jeffbrl/describe_instances.py
How to make datetime.datetime json serializable - boto3 ec2 describe_instances
# Adapted from https://stackoverflow.com/questions/35869985/datetime-datetime-is-not-json-serializable
import datetime
import json
import boto3
def datetime_handler(x):
if isinstance(x, datetime.datetime):
return x.isoformat()