700 Commits
Author SHA1 Message Date
Luca MarsellaandGitHub 4daa61d294 synchronize: fix changed status with link_dest (#812)
* synchronize: fix changed status with link_dest

With link_dest the module runs rsync with -vv, which also itemizes
unchanged files as '.f' followed by spaces. Any such line made the
module report no change, even when other files in the same run were
transferred, deleted or had their permissions updated.

Treat a line as unchanged only when it starts with a period and has no
attribute changes, which is how rsync lists files it did not touch.

Signed-off-by: Luca Marsella <marsluca7@gmail.com>
Assisted-by: Claude Opus 5.5

* synchronize: don't make link_dest test files world-readable

SonarCloud flags the new test tasks for granting access to others.
The test does not need it, so use 0750 and 0640 instead.

Signed-off-by: Luca Marsella <marsluca7@gmail.com>

* synchronize: read rsync markers only at the start of a line

The link_dest check split the whole output on the marker, so a file
name that contains the marker made a no-op sync report a change.

Signed-off-by: Luca Marsella <marsluca7@gmail.com>

---------

Signed-off-by: Luca Marsella <marsluca7@gmail.com>
2026-11-16 16:16:54 +09:00
Hideki SaitoandGitHub 4bd26a3cc6 Updated AZP test: (#817)
* Added ansible core 2.22 tests
* Updated remote OS targets
* Remove ansible core 2.17 from AZP remote test
* Fixed the substitution logic for AZP test job parameters

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-11-10 15:14:07 +09:00
Hideki SaitoandGitHub 0f4453f85e Update AZP remote tests (#809)
* Removing FreeBSD 13.5.
* Pinning RHEL 9.8 to Python 3.9 to keep compatibility with Python firewall library.

Signed-off-by: Hideki Saito <saito@fgrep.org>

test
2026-10-21 08:25:54 +09:00
dddd6c9b35 firewalld_info: fail cleanly when D-Bus is unavailable (#805)
python-firewall wraps a missing D-Bus socket in FirewallError, which the module did not catch, so Ansible reported a module crash instead of a normal failure.

Fixes #678


Assisted-by: Grok 4.7

Signed-off-by: Nikhil Jain <nikhjain@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-19 17:05:46 +09:00
Hideki SaitoandGitHub d5699a3fcf Replace FreeBSD version 14.4 with 14.5 for remote test (#796)
Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-09-15 15:13:35 +09:00
Susmita SenandGitHub 2f2a8e9b96 ACA-4558: synchronize: use ansible_host from play vars when absent from hostvars (#779)
* synchronize: use ansible_host from play vars when absent from hostvars

The synchronize action plugin built the rsync/ssh destination
exclusively from task_vars['hostvars'][inventory_hostname]. When
ansible_host was set via play-level vars: rather than inventory/
group_vars/host_vars, it was absent from that snapshot and the plugin
silently fell back to bare inventory_hostname, producing 'Host not
found' errors when ansible_host differed from the inventory name.

Fixes #469
2026-09-14 17:38:58 +09:00
Hideki SaitoandGitHub 93f25f88b8 Fix integration test for mount module for Ansible Core 2.22 or later (#794)
- Fixes #793

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-09-14 17:16:26 +09:00
Michael SprottandGitHub 20699d7184 mount: Create a state like absent but keeps the mountpoint (#774)
* Create a new state, with an example and integration test

* Now that I have my PR, add in my changelog

* Fix linter issues

* Another attempt at getting the sanity tests to pass

* Fix FreeBSD integration test

* Try to get sonarcloud code analysis happy

* Change state option name
2026-08-31 12:51:24 +09:00
John BarkerandGitHub 7ed7d2399c chore: Add .github/SECURITY.md (#785) 2026-08-26 09:11:25 -07:00
Abhijeet KasurdeandGitHub 035d4ad0a3 mount: restore fstab file if umount fails (#742)
* mount: restore fstab file if umount fails

* Refactored code

Fixes: #605

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Make CI green

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-08-26 10:39:24 +09:00
Hideki SaitoandGitHub 90c3bd65bf Fix version_added for profile_tasks datetime_format (#784)
- Fixes #783
- Replaced version_added value with 2.2.0 for datetime_format

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-08-25 17:55:49 +09:00
Hideki SaitoandGitHub 713a132aaa [CI] Bump partner-certification-checker to v4.1.0 (#780)
- Fixes ansible-lint import crash

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-08-25 15:16:05 +09:00
Tom PaineandGitHub 5dd6507835 fix(callback): align profile_tasks recap output width (#773)
Use display.columns and get_text_width() for TASKS RECAP headers,
timestamps, and timing rows so output matches display.banner() width.
Add truncate_task_names (default false, version_added 2.3.0) with
display-width-aware truncation and padding for multibyte task names.
Add unit tests for ASCII and CJK recap rows, including the reproducer
from #773.
2026-08-25 09:19:51 +09:00
Hideki SaitoandGitHub ffdf9ef998 Update AZP to follow ansible-test (#775)
- Replace FreeBSD 15.0 with 15.1

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-08-07 14:16:48 +09:00
Hideki SaitoandGitHub ef1937b771 Update README Support section to reference Red Hat Automation Hub (#768)
Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-07-08 08:37:41 +09:00
Hideki SaitoandGitHub bf4e5d917e Remove meta-runtime[unsupported-version] line from the skip_list (#767)
Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-07-08 08:14:25 +09:00
Hideki SaitoandGitHub e114652e45 Replace remote test env RHEL9.7 and 10.1 with 9.8 and 10.2 (#763)
- Replace 9.7 with 9.8
- Replace 10.1 with 10.2
- Addresses https://github.com/ansible/ansible/pull/87120

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-07-01 10:39:34 +09:00
Hideki SaitoandGitHub 18f2f69c53 Fixes the symlink handling issue in the authorized_key module (#760)
- Addresses CVE-2026-11837
- Fixes #759

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-06-30 08:45:30 +09:00
Hideki SaitoandGitHub 674315f2da Replace AZP remote test FreeBSD-14.2 with 14.3 for Ansible Core 2.19 (#755)
Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-06-09 21:21:39 +09:00
Hideki SaitoandGitHub f7945c4bc9 [CI] AZP bump test container version to 8.0.0 (#751)
- Bump test container version to 8.0.0 for Ansible Core 2.18+
- Keep using 7.0.0 for Ansible Core 2.16 and 2.17. Both versions don't support Python3.13.

Signed-off-by: Hideki Saito <saito@fgrep.org>
2026-06-01 03:34:12 -07:00
Abhijeet KasurdeandGitHub f265682c99 sysctl: Doc update (#745)
* Make documentation more generic

Fixes: #411

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-27 08:42:16 +09:00
Abhijeet KasurdeandGitHub af933670cc authorized_key: Use loop instead of with_file in example (#740)
Fixes: #607

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-24 16:22:50 +09:00
Vladimir BotkaandGitHub 3c232a2429 In FreeBSD, fail if loader.conf shall be reloaded. (#664)
Fix #663
2026-05-20 08:43:23 -07:00
9cd0a1f0ef docs: added attributes metadata for check_mode support (fixes #643) (#741)
Co-authored-by: jkhall81 <jason.kei.hall@gmail.com>
2026-05-21 00:24:37 +09:00
Felix FonteinandGitHub 3059c5138c Fix changelog fragment. (#720)
The changelog fragment for #687 claims that a feature is removed, which isn't the case. It's a simple bugfix.
2026-05-17 23:40:16 +09:00
0cc6be274c Updated azure CI targets and readme (#713)
Added lastest branches and updated information
Normalized test versions to cover all supported ones

Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2026-05-17 18:39:23 +09:00
Abhijeet KasurdeandGitHub dbeb4a861d firewalld_info: Use PY2 compatible syntax (#719)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-15 12:07:12 -07:00
Abhijeet KasurdeandGitHub 4bd25f24e5 Remove non-essential Python requirements (#718)
Fixes: #652

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-14 16:55:49 +09:00
Abhijeet KasurdeandGitHub 7cbef04377 Removed ANSIBLE_METADATA from remaining plugins (#717)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-14 07:28:14 +09:00
ca22c6fe26 Fix _AnsibleActionDone deprecation in patch plugin (#687)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2026-05-13 04:20:49 -07:00
Abhijeet KasurdeandGitHub d88a3c833c firewalld_info: Use module.warn (#715)
* Use module.warn to display warnings instead of module.exit_json

Fixes: #710

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-11 17:47:10 -07:00
centosinfra-prod-github-app[bot]andGitHub c4b1c2b0fb Merge pull request #638 from Silejonu/main
acl: correctly assert needed changes when recursive is true

SUMMARY
Right now, when setting recursive ACLs on a directory, all files in the directory are tested to check if a change is needed. If a single file has expected ACLs already set, then the test returns False and no changes are applied.
Fixes #592
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
acl
ADDITIONAL INFORMATION
I'm very much a beginner in Python, so any criticism is welcome.

Reviewed-by: Hideki Saito <saito@fgrep.org>
2026-05-08 06:22:12 +00:00
Abhijeet Kasurde 67e398bc62 test for ACL change
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-07 09:57:33 -04:00
SilejonuandAbhijeet Kasurde afa6471b73 refactor(acl): improve execution speed 2026-05-07 09:55:28 -04:00
SilejonuandAbhijeet Kasurde 871b4daeeb fix(acl): correctly assert needed changes when recursive is true 2026-05-07 09:55:28 -04:00
centosinfra-prod-github-app[bot]andGitHub fe77b17251 Merge pull request #712 from Akasurde/ignore_nuke
remove old ansible-core release

SUMMARY
Signed-off-by: Abhijeet Kasurde Akasurde@redhat.com
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
.azure-pipelines/azure-pipelines.yml

Reviewed-by: Hideki Saito <saito@fgrep.org>
2026-05-07 00:58:05 +00:00
Abhijeet Kasurde 28a09cd805 remove old ansible-core release
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-06 15:33:18 -04:00
Abhijeet Kasurde 853a333142 remove old ignore.txt
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2026-05-06 15:31:04 -04:00
centosinfra-prod-github-app[bot]andGitHub 2022c1bd86 Merge pull request #690 from barpavel/fix-686-module-utils-deprecation
Fix all deprecated module_utils imports before ansible-core 2.24 removal

SUMMARY
Fixes all deprecated ansible.module_utils imports across the entire collection that will be removed in ansible-core 2.24.
This PR comprehensively addresses deprecation warnings reported in #686 by updating import statements in 20 files to use the new recommended import paths, and removes 8 unused test utility files that contained deprecated imports.
Deprecated imports replaced:



Deprecated import
Replacement




ansible.module_utils._text
ansible.module_utils.common.text.converters


ansible.module_utils.common._collections_compat
collections.abc


ansible.module_utils.six.moves.shlex_quote
shlex.quote


ansible.module_utils.six.moves.reduce
functools.reduce


ansible.module_utils.six.moves.urllib.parse.urlparse
urllib.parse.urlparse


ansible.module_utils.six.string_types
basestring/str (Python 2/3 compatible)


ansible.module_utils.six.text_type
str


ansible.module_utils.six.PY3
Removed (simplified Python 2/3 conditionals)


ansible.module_utils.six.with_metaclass
Native metaclass= syntax


ansible.module_utils.six.iteritems
dict.items()



Files fixed (20 files, 1 commit per file for easier review):

plugins/action/patch.py
plugins/action/synchronize.py
plugins/callback/cgroup_perf_recap.py
plugins/callback/json.py
plugins/callback/jsonl.py
plugins/callback/profile_roles.py
plugins/callback/profile_tasks.py
plugins/modules/acl.py
plugins/modules/authorized_key.py
plugins/modules/firewalld_info.py
plugins/modules/mount.py
plugins/modules/patch.py
plugins/modules/rhel_rpm_ostree.py
plugins/modules/rpm_ostree_upgrade.py
plugins/modules/seboolean.py
plugins/modules/synchronize.py
plugins/modules/sysctl.py
plugins/shell/csh.py
plugins/shell/fish.py
tests/unit/modules/system/test_mount.py

Files deleted (8 unused test utility files):
These files are dead code - none of them are imported or used anywhere in the test suite or the collection. Removing them also addresses Python 2.7 compatibility concerns raised in code review, as several contained deprecated imports that would be incorrect to fix for Python 2.

tests/unit/compat/builtins.py
tests/unit/mock/loader.py
tests/unit/mock/path.py
tests/unit/mock/procenv.py
tests/unit/mock/vault_helper.py
tests/unit/mock/yaml_helper.py
tests/unit/modules/conftest.py
tests/unit/modules/utils.py

Completeness verified with:
git grep -n -P '_compat|utils._text|utils.six' -- '*.py' | grep -v yml

This command returns no results, confirming all deprecated imports have been replaced.
Notes on Python 2.7 compatibility:
For modules that may run on Python 2.7 managed hosts (e.g., authorized_key.py, synchronize.py, sysctl.py), Python 2/3 compatible fallbacks were used instead of direct Python 3 replacements:

authorized_key.py: try/except ImportError for urllib.parse.urlparse (falls back to urlparse on Python 2)
synchronize.py: try/except ImportError for shlex.quote (falls back to pipes.quote on Python 2)
sysctl.py: uses sys.version_info to set string_types to str on Python 3 (basestring on Python 2)

Also removes corresponding pylint:ansible-bad-import-from entries from tests/sanity/ignore-2.21.txt and tests/sanity/ignore-2.22.txt where applicable.
Fixes #686
ISSUE TYPE

Bugfix Pull Request

ADDITIONAL INFORMATION
Approach:
Each file is fixed in a separate commit for easier code review. The changelog fragment is added in a final commit. Corresponding pylint:ansible-bad-import-from ignore entries in tests/sanity/ignore-2.21.txt and tests/sanity/ignore-2.22.txt are removed in the same commit as the file fix (or the file removal commit).
CI results:
All 59 checks passing (Azure Pipelines sanity, units, lint, Docker, Remote across ansible-core 2.17 through devel, and Zuul ansible/check).

Reviewed-by: Felix Fontein <felix@fontein.de>
Reviewed-by: Pavel Bar
Reviewed-by: Abhijeet Kasurde
2026-05-06 19:19:51 +00:00
Pavel BarandCursor AI 42d76de1cf Add changelog fragment for deprecated imports fix
Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 19:06:51 +03:00
Pavel BarandCursor AI fb2bc7b4b5 Remove unused test utility files
These files are dead code - none of them are imported or used anywhere
in the test suite or the collection:
- tests/unit/compat/builtins.py
- tests/unit/mock/loader.py
- tests/unit/mock/path.py
- tests/unit/mock/procenv.py
- tests/unit/mock/vault_helper.py
- tests/unit/mock/yaml_helper.py
- tests/unit/modules/conftest.py
- tests/unit/modules/utils.py

Removing these files also addresses Python 2.7 compatibility concerns
raised in code review, as several contained deprecated imports that
would be incorrect to fix for Python 2.

Also removes corresponding pylint:ansible-bad-import-from entries from
tests/sanity/ignore-2.21.txt.

Related to #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 19:06:51 +03:00
Pavel BarandCursor AI 9603ef890f Fix deprecated imports in tests/unit/modules/system/test_mount.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:15 +03:00
Pavel BarandCursor AI 513d50192d Fix deprecated imports in plugins/shell/fish.py
Replace deprecated module_utils imports:
- ansible.module_utils.six.text_type -> str
- ansible.module_utils.six.moves.shlex_quote -> shlex.quote

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:15 +03:00
Pavel BarandCursor AI 5cbe684b48 Fix deprecated imports in plugins/shell/csh.py
Replace deprecated module_utils imports:
- ansible.module_utils.six.text_type -> str
- ansible.module_utils.six.moves.shlex_quote -> shlex.quote

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:15 +03:00
Pavel BarandCursor AI 17dd3b2e01 Fix deprecated imports in plugins/modules/sysctl.py
Replace deprecated module_utils imports:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters
- ansible.module_utils.six.string_types -> basestring/str (Python 2/3 compatible)

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00
Pavel BarandCursor AI 35bcea6ec9 Fix deprecated imports in plugins/modules/seboolean.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00
Pavel BarandCursor AI 065af18c26 Fix deprecated imports in plugins/modules/rpm_ostree_upgrade.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00
Pavel BarandCursor AI a2fa110036 Fix deprecated imports in plugins/modules/rhel_rpm_ostree.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00
Pavel BarandCursor AI 935a644f3c Fix deprecated imports in plugins/modules/patch.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00
Pavel BarandCursor AI 37e46324f5 Fix deprecated imports in plugins/modules/firewalld_info.py
Replace deprecated module_utils import:
- ansible.module_utils._text -> ansible.module_utils.common.text.converters

Fixes #686

Co-authored-by: Cursor AI
Signed-off-by: Pavel Bar <pbar@redhat.com>
2026-05-06 18:58:14 +03:00