diff options
author | Ricardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com> | 2018-05-16 14:59:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 14:59:01 +0200 |
commit | 62e1c14edc408e3f0bdd82c6bb264a969ce98fe9 (patch) | |
tree | 0619d51cce31bc5fe6f2f6f13489bc3adc33214c /bin | |
parent | 865f2c5990554e51e412f8c3748ff0e6fc29f59c (diff) | |
download | ansible-62e1c14edc408e3f0bdd82c6bb264a969ce98fe9.zip |
Pull persistent connection parameters via get_option (#39367)
* WIP Pull persistent connection parameters via get_option
* Fix pep8
* Add use_persistent_connection setting to paramiko_ssh plugin
* Add vars section to persistent_command_timeout setting and prevail provider values over config manager
* Use persistent_command_timeout on network_cli instead of timeout
* Fix unit tests
If we don't call loader to get network_cli, then _load_name is never
set and we get KeyError.
* Pull persistent_command_timeout via config manager for ios connection local
* Pull persistent_command_timeout via config manager on connection local
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ansible-connection | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection index 9587831817..006bcd7787 100755 --- a/bin/ansible-connection +++ b/bin/ansible-connection @@ -107,7 +107,7 @@ class ConnectionProcess(object): while self.connection.connected: signal.signal(signal.SIGALRM, self.connect_timeout) signal.signal(signal.SIGTERM, self.handler) - signal.alarm(C.PERSISTENT_CONNECT_TIMEOUT) + signal.alarm(self.connection.get_option('persistent_connect_timeout')) self.exception = None (s, addr) = self.sock.accept() @@ -141,7 +141,8 @@ class ConnectionProcess(object): self.shutdown() def connect_timeout(self, signum, frame): - display.display('persistent connection idle timeout triggered, timeout value is %s secs' % C.PERSISTENT_CONNECT_TIMEOUT, log_only=True) + display.display('persistent connection idle timeout triggered, timeout value is %s secs' + % self.connection.get_option('persistent_connect_timeout'), log_only=True) self.shutdown() def command_timeout(self, signum, frame): |