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
9b5619d7
Commit
9b5619d7
authored
Aug 06, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Atomically move known hosts file into place when edited by paramiko connections"
This reverts commit
bd49a835
.
parent
92382c41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
lib/ansible/runner/connection_plugins/paramiko_ssh.py
+2
-20
No files found.
lib/ansible/runner/connection_plugins/paramiko_ssh.py
View file @
9b5619d7
...
...
@@ -29,7 +29,6 @@ import pipes
import
socket
import
random
import
logging
import
tempfile
import
traceback
import
fcntl
import
re
...
...
@@ -40,6 +39,7 @@ from ansible.callbacks import vvv
from
ansible
import
errors
from
ansible
import
utils
from
ansible
import
constants
as
C
from
ansible.module_utils.basic
import
atomic_move
AUTHENTICITY_MSG
=
"""
paramiko: The authenticity of host '
%
s' can't be established.
...
...
@@ -381,25 +381,7 @@ class Connection(object):
self
.
ssh
.
load_system_host_keys
()
self
.
ssh
.
_host_keys
.
update
(
self
.
ssh
.
_system_host_keys
)
# gather information about the current key file, so
# we can ensure the new file has the correct mode/owner
key_dir
=
os
.
path
.
dirname
(
self
.
keyfile
)
key_stat
=
os
.
stat
(
self
.
keyfile
)
# Save the new keys to a temporary file and move it into place
# rather than rewriting the file. We set delete=False because
# the file will be moved into place rather than cleaned up.
tmp_keyfile
=
tempfile
.
NamedTemporaryFile
(
dir
=
key_dir
,
delete
=
False
)
os
.
chmod
(
tmp_keyfile
.
name
,
key_stat
.
st_mode
&
07777
)
os
.
chown
(
tmp_keyfile
.
name
,
key_stat
.
st_uid
,
key_stat
.
st_gid
)
self
.
_save_ssh_host_keys
(
tmp_keyfile
.
name
)
tmp_keyfile
.
close
()
os
.
rename
(
tmp_keyfile
.
name
,
self
.
keyfile
)
self
.
_save_ssh_host_keys
(
self
.
keyfile
)
except
:
...
...
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