diff --git a/changelogs/fragments/netconf_command_timeout.yaml b/changelogs/fragments/netconf_command_timeout.yaml new file mode 100644 index 00000000000..cf7a090982f --- /dev/null +++ b/changelogs/fragments/netconf_command_timeout.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fix netconf connection command timeout issue (https://github.com/ansible/ansible/pull/58322) diff --git a/lib/ansible/plugins/connection/netconf.py b/lib/ansible/plugins/connection/netconf.py index 0093ec21606..a04b58c0e7a 100644 --- a/lib/ansible/plugins/connection/netconf.py +++ b/lib/ansible/plugins/connection/netconf.py @@ -321,6 +321,8 @@ class Connection(NetworkConnectionBase): timeout=self.get_option('persistent_connect_timeout'), ssh_config=ssh_config ) + + self._manager._timeout = self.get_option('persistent_command_timeout') except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(to_native(exc)) except ImportError as exc: