Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d15172ab
Commit
d15172ab
authored
Mar 01, 2012
by
Christopher Johnston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a -T option for setting ssh timeout in seconds
parent
2773234c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
bin/ansible
+3
-0
lib/ansible/runner.py
+1
-1
No files found.
bin/ansible
View file @
d15172ab
...
...
@@ -59,6 +59,8 @@ class Cli(object):
help
=
"try to print output on one line"
)
parser
.
add_option
(
'-t'
,
'--tree'
,
dest
=
'tree'
,
default
=
None
,
help
=
"if specified, a directory name to save output to, one file per host"
)
parser
.
add_option
(
'-T'
,
'--timeout'
,
default
=
C
.
DEFAULT_TIMEOUT
,
type
=
'int'
,
dest
=
'timeout'
,
help
=
"set the timeout in seconds for ssh"
)
options
,
args
=
parser
.
parse_args
()
...
...
@@ -82,6 +84,7 @@ class Cli(object):
remote_user
=
options
.
remote_user
,
remote_pass
=
sshpass
,
host_list
=
options
.
host_list
,
timeout
=
options
.
timeout
,
forks
=
options
.
forks
,
pattern
=
options
.
pattern
,
verbose
=
True
,
...
...
lib/ansible/runner.py
View file @
d15172ab
...
...
@@ -117,7 +117,7 @@ class Runner(object):
try
:
# try paramiko
ssh
.
connect
(
host
,
username
=
self
.
remote_user
,
allow_agent
=
True
,
look_for_keys
=
True
,
password
=
self
.
remote_pass
)
look_for_keys
=
True
,
password
=
self
.
remote_pass
timeout
=
self
.
timeout
)
return
[
True
,
ssh
]
except
Exception
,
e
:
# it failed somehow, return the failure string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment