summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2013-07-03 23:00:09 +0000
committerSeth Vidal <skvidal@fedoraproject.org>2013-07-03 23:00:09 +0000
commitcfaddae895ceb6c8f4f2942eccde8e975076cfba (patch)
tree19041977a3ee00b9d3b889c5563ae786cbe282e8 /scripts
parentf6e3a85a0abc8fc0de5a6f2be5c65e60dbcc690a (diff)
downloadansible-cfaddae895ceb6c8f4f2942eccde8e975076cfba.tar.gz
ansible-cfaddae895ceb6c8f4f2942eccde8e975076cfba.tar.xz
ansible-cfaddae895ceb6c8f4f2942eccde8e975076cfba.zip
show_changed to show data - way too many calls to keyreturn :)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/keyreturn2
-rwxr-xr-xscripts/show-changed10
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/keyreturn b/scripts/keyreturn
index 5a28ba674..4d6478c55 100755
--- a/scripts/keyreturn
+++ b/scripts/keyreturn
@@ -17,7 +17,7 @@ def main():
print >> sys.stderr, "No dict found"
sys.exit(1)
if name in obj:
- print '%s: %s' % (name, obj.get(name, None))
+ print '%s:%s' % (name,obj.get(name, None))
else:
print >> sys.stderr, "No key %s found" % name
ret = 1
diff --git a/scripts/show-changed b/scripts/show-changed
index e073e2f7c..5e64c5111 100755
--- a/scripts/show-changed
+++ b/scripts/show-changed
@@ -22,21 +22,25 @@ do
dir=`dirname $logpath`
runtime=`basename $dir`
echo -n "$runtime - $hostname "
- echo $line | cut -d: -f2-| cut -f3-4
+ pre=`echo $line | cut -d: -f2-| cut -f3-4`
json=`echo $line | cut -d: -f2- |cut -f5-`
echo $json| python -m json.tool 2>/dev/null >&2
if [ $? != 0 ]; then
echo "Error parsing json"
else
if [ "$verbose" == 'yes' ]; then
+ echo $pre
echo $json| python -m json.tool
else
+ echo -n $pre
for term in task_userid cmd task_args task_module; do
- echo $json| /srv/web/infra/ansible/scripts/keyreturn $term 2>/dev/null >&2
+ res=`echo $json| /srv/web/infra/ansible/scripts/keyreturn $term 2>/dev/null`
if [ $? == 0 ]; then
- echo $json| /srv/web/infra/ansible/scripts/keyreturn $term
+ echo -n " $res"
+ #$json| /srv/web/infra/ansible/scripts/keyreturn $term
fi
done
+ echo ''
fi
fi
done