1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 10:35:34 +00:00
community.general/plugins
patchback[bot] 876f8ca18c
[PR #12185/213581be backport][stable-13] fix: treat chdev execution failures as module errors in aix_devices (#12197)
fix: treat chdev execution failures as module errors in aix_devices (#12185)

* fix: treat chdev execution failures as module errors in aix_devices

##### SUMMARY
Fix the aix_devices module so that a failed chdev command is reported as a module failure instead of a successful result.

The previous implementation called fail_json incorrectly by returning success through the normal completion path when chdev returned a non-zero exit status. This could allow a playbook to continue even though the requested device attribute change was not applied.

This change replaces the success-style error handling with proper failure handling in the chdev execution path, making task results consistent with the actual command outcome.

##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
aix_devices

##### ADDITIONAL INFORMATION
The affected code path is in change_device_attr() when the module executes chdev to apply attribute updates.

Before this change:
- chdev could fail
- the module could still report success
- later tasks could run against an unexpected system state

After this change:
- chdev failures are returned through fail_json
- the task stops with an error
- playbook behavior matches the real execution result

```paste below
Before:
module.exit_json(msg="Failed to run chdev.", rc=rc, err=err)

After:
module.fail_json(msg="Failed to run chdev.", rc=rc, err=err)
```

* Add changelog fragment for aix_devices chdev failure fix (#12185)

---------


(cherry picked from commit 213581bef8)

Co-authored-by: Hirofumi Arimoto <hiro0107@users.noreply.github.com>
Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com>
2026-06-05 13:47:25 +02:00
..
action [PR #12093/1bf5e6e6 backport][stable-13] iptables_state: clean up code (#12098) 2026-05-25 15:34:01 +02:00
become pfexec become plugin: fix broken defaults for illumos/SmartOS (#11623) 2026-04-25 21:12:36 +02:00
cache Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
callback [PR #12113/ef5b22d1 backport][stable-13] unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12143) 2026-05-30 20:29:46 +02:00
connection [PR #12163/f9d4f0ad backport][stable-13] Fix incus Windows modules with ansible-core 2.21 (#12179) 2026-06-02 21:18:49 +02:00
doc_fragments [PR #11752/d4031f36 backport][stable-13] kopia: Add kopia_repository module (#12127) 2026-05-30 15:12:10 +02:00
filter [PR #12167/97b464de backport][stable-13] version_sort filter: fix example's description (#12171) 2026-06-02 21:18:37 +02:00
inventory [PR #12094/cbc6f6ee backport][stable-13] multiple: replace namedtuple with dataclass (#12102) 2026-05-25 15:59:50 +02:00
lookup [PR #12140/48db8630 backport][stable-13] filetree lookup: handle invalid exclude regex with AnsibleError (#12184) 2026-06-04 06:28:33 +02:00
module_utils [PR #12124/b799c6f5 backport][stable-13] redfish_config: fix KeyError: 'ret' when SetManagerNic cannot find a matching NIC (#12176) 2026-06-02 21:18:12 +02:00
modules [PR #12185/213581be backport][stable-13] fix: treat chdev execution failures as module errors in aix_devices (#12197) 2026-06-05 13:47:25 +02:00
plugin_utils Lookup plugins: prevent using _terms for positional arguments, and reject positional arguments completely for lookups that don't use them (#12060) 2026-05-17 09:43:21 +02:00
test Make all doc fragments, module utils, and plugin utils private (#11896) 2026-04-20 20:16:26 +02:00