diff --git a/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml b/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml new file mode 100644 index 00000000..c81e677c --- /dev/null +++ b/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml @@ -0,0 +1,3 @@ +bugfixes: + - exos_facts - returns timeout error when we use connection type ``network_cli``. + It happened because we send command without ``no-refresh`` and script ``cli2json.py`` stuck in loop while reading console output (https://github.com/ansible-collections/community.network/pull/517). diff --git a/plugins/module_utils/network/exos/facts/legacy/base.py b/plugins/module_utils/network/exos/facts/legacy/base.py index 5c0bf20b..690b8a87 100644 --- a/plugins/module_utils/network/exos/facts/legacy/base.py +++ b/plugins/module_utils/network/exos/facts/legacy/base.py @@ -130,7 +130,7 @@ class Interfaces(FactsBase): COMMANDS = [ 'show switch', - {'command': 'show port config', 'output': 'json'}, + {'command': 'show port config no-refresh', 'output': 'json'}, {'command': 'show port description', 'output': 'json'}, {'command': 'show vlan detail', 'output': 'json'}, {'command': 'show lldp neighbors', 'output': 'json'} diff --git a/tests/unit/plugins/modules/exos_fixtures/show_port_config b/tests/unit/plugins/modules/exos_fixtures/show_port_config_no-refresh similarity index 100% rename from tests/unit/plugins/modules/exos_fixtures/show_port_config rename to tests/unit/plugins/modules/exos_fixtures/show_port_config_no-refresh