mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix race condition on creating the temp directory for ControlPersist
Fixes #3943
This commit is contained in:
parent
26a8d4ce9f
commit
53c2f4c1bb
1 changed files with 4 additions and 1 deletions
|
@ -43,9 +43,12 @@ class Connection(object):
|
||||||
self.user = user
|
self.user = user
|
||||||
self.password = password
|
self.password = password
|
||||||
self.private_key_file = private_key_file
|
self.private_key_file = private_key_file
|
||||||
self.cp_dir = utils.prepare_writeable_dir('$HOME/.ansible/cp',mode=0700)
|
|
||||||
self.HASHED_KEY_MAGIC = "|1|"
|
self.HASHED_KEY_MAGIC = "|1|"
|
||||||
|
|
||||||
|
fcntl.lockf(self.runner.process_lockfile, fcntl.LOCK_EX)
|
||||||
|
self.cp_dir = utils.prepare_writeable_dir('$HOME/.ansible/cp',mode=0700)
|
||||||
|
fcntl.lockf(self.runner.process_lockfile, fcntl.LOCK_UN)
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
''' connect to the remote host '''
|
''' connect to the remote host '''
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue