From 9b4bb04d07499a51be4ac8d194adcd01a58c5cfe Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Wed, 19 Sep 2018 21:30:53 +0530 Subject: [PATCH] [2.7]fix nxos_facts indefinite hang for text based output (#45846) * fix nxos_facts indefinite hang for text based output (#45845) Signed-off-by: Trishna Guha (cherry picked from commit 1b0c4fde86858f363780ca5e90f297c7267a3989) --- changelogs/fragments/fix_nxos_facts_indefinite_hang.yaml | 2 ++ lib/ansible/modules/network/nxos/nxos_facts.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/fix_nxos_facts_indefinite_hang.yaml diff --git a/changelogs/fragments/fix_nxos_facts_indefinite_hang.yaml b/changelogs/fragments/fix_nxos_facts_indefinite_hang.yaml new file mode 100644 index 00000000000..fbced3371ac --- /dev/null +++ b/changelogs/fragments/fix_nxos_facts_indefinite_hang.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 4ecb1ba7aa6..a4d41b3a2d0 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