mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 00:16:49 +00:00
Fix missing eval for string search in ssh controlpersist
This commit is contained in:
@@ -247,7 +247,7 @@ class Connection(object):
|
||||
# the host to known hosts is not intermingled with multiprocess output.
|
||||
fcntl.lockf(self.runner.output_lockfile, fcntl.LOCK_UN)
|
||||
fcntl.lockf(self.runner.process_lockfile, fcntl.LOCK_UN)
|
||||
controlpersisterror = stderr.find('Bad configuration option: ControlPersist') or stderr.find('unknown configuration option: ControlPersist') != -1
|
||||
controlpersisterror = stderr.find('Bad configuration option: ControlPersist') != -1 or stderr.find('unknown configuration option: ControlPersist') != -1
|
||||
if p.returncode != 0 and controlpersisterror:
|
||||
raise errors.AnsibleError('using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" (or ansible_ssh_args in the config file) before running again')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user