From d1621ba67d7dabe69720dc2eb56b22fc9d043d65 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Wed, 26 Sep 2018 03:04:50 +0530 Subject: [PATCH] [2.6] fix nxos_facts indefinite hang for text based output (#45847) * fix nxos_facts indefinite hang for text based output (#45845) Signed-off-by: Trishna Guha (cherry picked from commit 1b0c4fde86858f363780ca5e90f297c7267a3989) * add changelog Signed-off-by: Trishna Guha --- changelogs/fragments/nxos_facts_26.yaml | 2 ++ lib/ansible/modules/network/nxos/nxos_facts.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/nxos_facts_26.yaml diff --git a/changelogs/fragments/nxos_facts_26.yaml b/changelogs/fragments/nxos_facts_26.yaml new file mode 100644 index 0000000000..fbced3371a --- /dev/null +++ b/changelogs/fragments/nxos_facts_26.yaml @@ -0,0 +1,2 @@ +bugfixes: +- fix nxos_facts indefinite hang for text based output (https://github.com/ansible/ansible/pull/45845). diff --git a/lib/ansible/modules/network/nxos/nxos_facts.py b/lib/ansible/modules/network/nxos/nxos_facts.py index 4ecb1ba7aa..a4d41b3a2d 100644 --- a/lib/ansible/modules/network/nxos/nxos_facts.py +++ b/lib/ansible/modules/network/nxos/nxos_facts.py @@ -630,7 +630,7 @@ class Interfaces(FactsBase): fact = dict() fact['port'] = self.parse_lldp_port(item) fact['sysname'] = self.parse_lldp_sysname(item) - facts[local_intf].append(facts) + facts[local_intf].append(fact) return facts