diff --git a/lib/ansible/module_utils/network/nxos/nxos.py b/lib/ansible/module_utils/network/nxos/nxos.py index 1b251139714..5beee80d32d 100644 --- a/lib/ansible/module_utils/network/nxos/nxos.py +++ b/lib/ansible/module_utils/network/nxos/nxos.py @@ -341,7 +341,7 @@ class Nxapi: if response['ins_api'].get('outputs'): output = response['ins_api']['outputs']['output'] for item in to_list(output): - if check_status and item['code'] != '200': + if check_status is True and item['code'] != '200': if return_error: result.append(item) else: diff --git a/test/integration/targets/prepare_nxos_tests/tasks/main.yml b/test/integration/targets/prepare_nxos_tests/tasks/main.yml index 9d2e5cdd6cd..454ece66bfe 100644 --- a/test/integration/targets/prepare_nxos_tests/tasks/main.yml +++ b/test/integration/targets/prepare_nxos_tests/tasks/main.yml @@ -11,6 +11,12 @@ state: present connection: network_cli +- name: Enable lldp + nxos_config: + lines: + - feature lldp + ignore_errors: yes + # Gather the list of interfaces on this device and make the list # available for integration tests that need them. #