diff --git a/changelogs/fragments/lag_interfaces_error.yaml b/changelogs/fragments/lag_interfaces_error.yaml new file mode 100644 index 000000000..bb607bd58 --- /dev/null +++ b/changelogs/fragments/lag_interfaces_error.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - "lag_interfaces - Fix bug where lag interfaces was not erroring on command failure. (https://github.com/ansible-collections/cisco.nxos/pull/923)" diff --git a/galaxy.yml b/galaxy.yml index 494fdf171..c5d8ff2a8 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,4 +10,4 @@ readme: README.md repository: https://github.com/ansible-collections/cisco.nxos issues: https://github.com/ansible-collections/cisco.nxos/issues tags: [cisco, nxos, networking, nxapi, netconf] -version: 9.2.1 +version: 9.2.2-devel diff --git a/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py b/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py index fc3202a7f..433a5a950 100644 --- a/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py +++ b/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py @@ -86,6 +86,8 @@ def execute_module(self): err_str = item if err_str.lower().startswith("cannot add"): self._module.fail_json(msg=err_str) + elif err_str.lower().startswith("command failed"): + self._module.fail_json(msg=err_str) result["changed"] = True if self.state in self.ACTION_STATES: