* Passwordstore lookup: make `directory` an INI option
The passwordstore lookup plugin defaults to using the password store
tree under ~/.password-store. Being able to configure the directory used
for the whole Ansible project helps to use project-specific credentials
directory.
As `get_option` was already used for this option, this does not require
any change in the code itself.
* Add related changelog
* Update changelogs/fragments/12298-passwordstore-directory-as-ini-option.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* filesystem: remove test setup for Ubuntu <16.04
* more Ubuntu 16.04 refs
* and more old Ubuntu refs in tests
* and yet more truisms in tests conditionals
* fix(xbps): add stdout/stderr to module output and fix error message typo
Include stdout and stderr from the last executed command in all
exit_json and fail_json calls so users can see the actual xbps output
when debugging failures (addresses issue #2478).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(xbps): add basic unit tests using uthelper
Cover install (new, already present, failure) and remove (installed,
absent) scenarios. Verifies stdout/stderr are propagated in output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* changelog: add fragment for PR 12234
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add version_added.
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(filesystem): handle BusyBox blkid output when detecting existing filesystem
BusyBox blkid ignores util-linux -o/-s flags and outputs the full device
info line instead of just the filesystem type. Parse the TYPE= field from
the raw output when it does not look like a plain type name.
Fixes#7283
* changelog: add fragment for PR 12235
* antsibull-nox: split up unit tests by Python version.
* Adjust syntax for Python-version specific unit tests.
* Update Python version in ansible-test example.
* add golang_package module to manage Go packages via go install
Adds a new module to install, update, and remove Go packages
using go install. Supports inline version pinning in package
names (e.g. pkg/tool/cmd with version suffix).
Assisted-by: Claude Opus 4.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix copyright year and BOTMETA alphabetical order
* fix environment keyword docs, add integration test aliases
- Use C(environment) instead of O(ignore:environment) for task keyword
- Add tests/integration/targets/golang_package/aliases for CI
- Fix setup.yml: handle Alpine/ArchLinux/FreeBSD package names, skip Go < 1.16
- Pin tests to x/tools v0.24.1 (only version compatible with Go 1.16-1.25)
Co-authored-by: Cursor <cursoragent@cursor.com>
* test signing trace
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Re-enable most filesystem tests.
* Fix conditionals (ansible-core 2.19).
* Fedora also needs gfs2-utils.
* fatresize seems to be broken on Ubuntu.
* Install util-linux-extra on Debian/Ubuntu.
* Fix conditionals.
* Temporarily disable bcachefs tests on Arch (and thus on all platforms).
* [TEMP] Generally disable gfs2 tests.
* fix(zypper_repository): stop .repo file content overriding user-specified enabled/autorefresh/gpgcheck
When repo= pointed to a .repo file, values parsed from that file were
overwriting the desired state set from module params, causing enabled: false
to have no effect.
Fixes#8783
* changelog: add fragment for PR 12022
* fix(zypper_repository): preserve .repo file settings when parameters are not explicitly provided
When enabled/autorefresh/disable_gpg_check are not provided by the user,
fall back to values from the .repo file before applying hard defaults,
so that existing tasks relying on the .repo file content are not broken.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(xml): preserve DOCTYPE declaration when writing XML files
Pass `doctype=tree.docinfo.doctype` to all `ElementTree.write()` calls
so lxml does not silently drop the DOCTYPE on serialization. Also replace
`etree.tostring()` with BytesIO+write() in the diff and xmlstring paths
for consistency.
Fixes#2762
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(xml): add integration test for DOCTYPE preservation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(changelog): add fragment for xml DOCTYPE fix (#12148)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(launchd): restarted and reloaded always report changed
Both actions unconditionally execute commands (unload/load/start),
so changed must always be True in non-check mode, regardless of
whether the PID or state happened to match before and after.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(changelog): add fragment for PR 12122
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(launchd): restarted and reloaded always report changed in check mode too
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* consolidate if branches
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(udm_dns_record): normalize IPv6 addresses before comparison
UCS stores IPv6 addresses in expanded form; providing a shortened address
causes obj.diff() to always detect a difference and report changed=True.
Normalize IPv6 values in the data dict to exploded form before updating
the Univention object.
Fixes#317
* changelog: add fragment for PR 12149
* add type hint
* fix(java_cert): remove -noprompt from keytool -list to allow stdin password
-noprompt is not a valid option for keytool -list (only for importkeystore/
importcert). On Java 8, passing it caused keytool to skip reading the store
password from stdin, resulting in a null password and NullPointerException.
Fixes#3023
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(java_cert): add idempotency test for pkcs12 import with password
Exercises _export_public_cert_from_pkcs12 when the alias already exists,
verifying the password is correctly read from stdin on the comparison path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* changelog: add fragment for PR 12151
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(counter_enabled): display output for looped tasks with delegate_to
Implement v2_runner_item_on_ok, v2_runner_item_on_failed, and
v2_runner_item_on_skipped so that looped tasks (including those
using delegate_to: localhost) produce visible output.
Also extract _host_label, _display_result_ok, _display_result_failed,
and _display_result_skipped helpers to eliminate repeated delegation
and message-building logic across the callback methods.
Fixes#8187
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* changelog(counter_enabled): add fragment for PR #12067
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(counter_enabled): add integration tests, adjust _host_label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(counter_enabled): migrate integration tests to callback test framework
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(counter_enabled): fix integration tests to use set_fact instead of debug
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add unit tests for filetree lookup exclude handling
* Fix import order in filetree lookup unit tests
* Replace filetree unit tests with integration tests
* Fix lookup_filetree integration test setup directories
* Fix lookup_filetree integration test lookup term path
* Use remote_tmp_dir for lookup_filetree integration test files
* xenserver_guest_info: use fallback chain for VDI format detection
* changelog: add PR URL to
changelog fragment
* test: set mismatched vdi_type in vm-3 fixture to test fallback chain precedence
Set vdi_type to "vhd" while image-format remains "qcow2" so the unit
test verifies that image-format takes precedence in the fallback chain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* 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>
* opkg - path_prefix needs to be a list
path_prefix is passed to get_bin_path() which expects opt_dirs to be a list
of paths. Passing in a string instead of a list of paths results in incorrect
values being adding to the path when searching for the command to run.
* Add changelog
* filetree lookup - handle invalid exclude regex with AnsibleError Wrap re.compile() for the exclude option so invalid regular expressions produce a clear AnsibleError instead of an uncaught re.error traceback.
* add changelog fragment
* add changelog fragment
* Fix changelog fragment line endings (LF)
Co-authored-by: Cursor <cursoragent@cursor.com>
* Used AnsibleLookupError instead of AnsibleError
* Update changelogs/fragments/12140-filetree-exclude-regex-error.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Used AnsibleLookupError instead of AnsibleError
* Updated changelog format
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
cleanup_packages() called module.fail_json(cmd=, rc=, stdout=, stderr=)
without the mandatory msg= argument. When the underlying emerge --depclean
exited non-zero, AnsibleModule.fail_json() itself crashed with
"AnsibleModule.fail_json() missing 1 required positional argument: 'msg'"
before the real failure could reach the controller, leaving users with no
diagnostic about why depclean actually failed.
Same wording style as the sibling install_packages() failure branch
("Packages not installed.").