summaryrefslogtreecommitdiffstats
path: root/bin/cluster
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-07-06 14:36:53 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-07-06 14:36:53 -0400
commitd24c15acde4f061f174fecc1f3312da2dea5ba19 (patch)
treeee827fe08291881f0bc59bd2a7b424825bd6e434 /bin/cluster
parenta7f98a0b8c19d7d20c2e9761104ca24affbbb249 (diff)
parent1bab4edd3d8cd3201bf210312f18fc9841c339d3 (diff)
downloadopenshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.gz
openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.bz2
openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.tar.xz
openshift-d24c15acde4f061f174fecc1f3312da2dea5ba19.zip
Merge pull request #291 from lhuard1A/profile
Add a --profile option to spot which task takes more time
Diffstat (limited to 'bin/cluster')
-rwxr-xr-xbin/cluster6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/cluster b/bin/cluster
index 720dd230c..fbbffadc9 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -184,6 +184,9 @@ class Cluster(object):
verbose, inventory, ansible_env, playbook
)
+ if args.profile:
+ command = 'ANSIBLE_CALLBACK_PLUGINS=ansible-profile/callback_plugins ' + command
+
if args.verbose > 1:
command = 'time {}'.format(command)
@@ -240,6 +243,9 @@ if __name__ == '__main__':
meta_parser.add_argument('-o', '--option', action='append',
help='options')
+ meta_parser.add_argument('-p', '--profile', action='store_true',
+ help='Enable playbook profiling')
+
action_parser = parser.add_subparsers(dest='action', title='actions',
description='Choose from valid actions')