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
183fce6d
Commit
183fce6d
authored
Aug 08, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect SFTP disablement in paramiko + changelog updates
parent
51083e48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
CHANGELOG.md
+8
-0
lib/ansible/runner/connection/paramiko_ssh.py
+8
-2
No files found.
CHANGELOG.md
View file @
183fce6d
...
@@ -6,6 +6,14 @@ Ansible Changes By Release
...
@@ -6,6 +6,14 @@ Ansible Changes By Release
*
I can barely see the roadmap from the heat coming off of it.
*
I can barely see the roadmap from the heat coming off of it.
*
login_unix_socket option for mysql user and database modules (see PR #781 for doc notes)
*
login_unix_socket option for mysql user and database modules (see PR #781 for doc notes)
*
new modules -- pip, easy_install, apt_repository, supervisorctl
*
ansible --version will now give branch/SHA information if running from git
*
error handling for setup module when SELinux is in a weird state
*
misc yum module fixes
*
better sudo permissions when encountering different umasks
*
YAML syntax errors detected and show where the problem is
*
better changed=True/False detection in user module on older Linux distros
*
when using paramiko and SFTP is not accessible, do not traceback, but return a nice human readable msg
0.
6 "Cabo" -- August 6, 2012
0.
6 "Cabo" -- August 6, 2012
...
...
lib/ansible/runner/connection/paramiko_ssh.py
View file @
183fce6d
...
@@ -122,7 +122,10 @@ class ParamikoConnection(object):
...
@@ -122,7 +122,10 @@ class ParamikoConnection(object):
''' transfer a file from local to remote '''
''' transfer a file from local to remote '''
if
not
os
.
path
.
exists
(
in_path
):
if
not
os
.
path
.
exists
(
in_path
):
raise
errors
.
AnsibleFileNotFound
(
"file or module does not exist:
%
s"
%
in_path
)
raise
errors
.
AnsibleFileNotFound
(
"file or module does not exist:
%
s"
%
in_path
)
sftp
=
self
.
ssh
.
open_sftp
()
try
:
sftp
=
self
.
ssh
.
open_sftp
()
except
:
raise
errors
.
AnsibleError
(
"failed to open a SFTP connection"
)
try
:
try
:
sftp
.
put
(
in_path
,
out_path
)
sftp
.
put
(
in_path
,
out_path
)
except
IOError
:
except
IOError
:
...
@@ -131,7 +134,10 @@ class ParamikoConnection(object):
...
@@ -131,7 +134,10 @@ class ParamikoConnection(object):
def
fetch_file
(
self
,
in_path
,
out_path
):
def
fetch_file
(
self
,
in_path
,
out_path
):
''' save a remote file to the specified path '''
''' save a remote file to the specified path '''
sftp
=
self
.
ssh
.
open_sftp
()
try
:
sftp
=
self
.
ssh
.
open_sftp
()
except
:
raise
errors
.
AnsibleError
(
"failed to open a SFTP connection"
)
try
:
try
:
sftp
.
get
(
in_path
,
out_path
)
sftp
.
get
(
in_path
,
out_path
)
except
IOError
:
except
IOError
:
...
...
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