Allow the SSH timeout to be passed to playbooks just like it already could with /usr/bin/ansible
This commit is contained in:
parent
e3b4981feb
commit
e6f175e929
1 changed files with 4 additions and 1 deletions
|
@ -78,6 +78,8 @@ def main(args):
|
||||||
help="ask for SSH password")
|
help="ask for SSH password")
|
||||||
parser.add_option("-M", "--module-path", dest="module_path",
|
parser.add_option("-M", "--module-path", dest="module_path",
|
||||||
help="path to module library", default=C.DEFAULT_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)
|
options, args = parser.parse_args(args)
|
||||||
|
|
||||||
|
@ -98,7 +100,8 @@ def main(args):
|
||||||
forks=options.forks,
|
forks=options.forks,
|
||||||
verbose=True,
|
verbose=True,
|
||||||
remote_pass=sshpass,
|
remote_pass=sshpass,
|
||||||
callbacks=PlaybookCallbacks()
|
callbacks=PlaybookCallbacks(),
|
||||||
|
timeout=options.timeout
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
pb.run()
|
pb.run()
|
||||||
|
|
Loading…
Reference in a new issue