mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-12 19:15:31 +00:00
* 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) --------- Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com> |
||
|---|---|---|
| .. | ||
| .keep | ||
| 11588-nmcli-bond-arp-diff.yml | ||
| 11998-xenserver-disk-uuid-vdi-type.yml | ||
| 12032-slack-files-support.yml | ||
| 12087-keycloak-realm-max-secondary-auth-failures.yml | ||
| 12093-iptables_state.yml | ||
| 12094-namedtuple-to-dataclass.yml | ||
| 12097-snap-hold-revision.yml | ||
| 12106-fix-lxc-create_script.yml | ||
| 12113-unixy-delegated-host.yml | ||
| 12120-consul-kv-empty-value.yml | ||
| 12121-parted-suse-msdos-type-code.yml | ||
| 12123-htpasswd-crypt-schemes.yml | ||
| 12124-redfish-setmanagernic-keyerror.yml | ||
| 12137-pamd-authselect.yml | ||
| 12140-filetree-exclude-regex-error.yml | ||
| 12158-incus-windows-ansible-core-221.yml | ||
| 12182-opkg-path-prefix.yml | ||
| 12185-aix-devices-chdev-fail.yml | ||
| composer-working-dir-and-config-sha256.yaml | ||
| portage-depclean-fail_json-msg.yml | ||