From e6f175e929abeb16ea31ce745a5bc4f01bb6ce28 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 13 Mar 2012 21:35:34 -0400 Subject: [PATCH] Allow the SSH timeout to be passed to playbooks just like it already could with /usr/bin/ansible --- bin/ansible-playbook | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ansible-playbook b/bin/ansible-playbook index e5372903b43..114201b8b56 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -78,6 +78,8 @@ def main(args): help="ask for SSH password") parser.add_option("-M", "--module-path", dest="module_path", help="path to module library", default=C.DEFAULT_MODULE_PATH) + parser.add_option('-T', '--timeout', default=C.DEFAULT_TIMEOUT, type='int', + dest='timeout', help="set the SSH timeout in seconds") options, args = parser.parse_args(args) @@ -98,7 +100,8 @@ def main(args): forks=options.forks, verbose=True, remote_pass=sshpass, - callbacks=PlaybookCallbacks() + callbacks=PlaybookCallbacks(), + timeout=options.timeout ) try: pb.run()