Skip to content

Instantly share code, notes, and snippets.

View abutcher's full-sized avatar

Andrew Butcher abutcher

  • Red Hat
  • Raleigh, NC
View GitHub Profile
@abutcher
abutcher / tasks.yaml
Last active June 22, 2016 15:51 — forked from thoraxe/tasks.yaml
TASK: [openshift_common | debug ] *********************************************
ok: [ec2-54-175-48-96.compute-1.amazonaws.com] => {
"msg": "yum name=atomic-openshift state=present"
}
TASK: [openshift_common | debug ] *********************************************
ok: [ec2-54-175-48-96.compute-1.amazonaws.com] => {
"msg": "openshift_pkg_version - -3.2.0.44"
}
@abutcher
abutcher / human_log.py
Last active February 4, 2016 20:47 — forked from cliffano/human_log.py
FIELDS = ['cmd', 'command', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
# use default encoding, check out sys.setdefaultencoding
print u'\n{0}:\n{1}'.format(field, res[field])
# or use specific encoding, e.g. utf-8