2699 Commits
Author SHA1 Message Date
Thomas WoernerandGitHub c6f0e6b969 Merge pull request #1433 from rjeffman/temp_fix_for_python_315
Use Ansible 2.22 for Python 3.15
2026-10-19 09:36:00 +02:00
Rafael Guterres Jeffman 57b1ad87a5 fixup! Use Ansible 2.22 for Python 3.15 2026-10-13 10:46:11 -03:00
Rafael Guterres Jeffman 954a7cb5e1 TEMP: trigger CI for ipauser 2026-10-09 14:09:52 -03:00
Rafael Guterres Jeffman d9a498d5b6 Use Ansible 2.22 for Python 3.15
Fedora Rawhide (46) provides Python 3.15 which breaks Ansible versions
prior to 2.22. As of today, Ansible 2.22 is not released yet, so we need
to use beta and release candidate versions at this time.

This patch will still work once the stable release is available, and
will allow the use of special versions in the future, if required.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-10-09 12:08:35 -03:00
Rafael Guterres JeffmanandGitHub 5ba9b59d5b Merge pull request #1431 from t-woerner/build_containers_max_ansible_core_2-20
build-containers.yml: Limit Anisble core version to 2.20
2026-08-07 10:18:44 -03:00
Thomas Woerner 4653bb4d9c build-containers.yml: Limit Anisble core version to 2.20
Ansible core needs to stay at 2.20 for now to be able to build the
container for ansible-freeipa testing on Fedora Rawhide.

ansible.legacy.setup is not usable with Ansible core 2.21:

ansible/module_utils/_internal/_patches/__init__.py, line 45,
    in get_current_implementation\nAttributeError: module
    'dataclasses' has no attribute '_is_type'
2026-08-03 08:53:56 +02:00
Rafael Guterres JeffmanandGitHub e37f190ee1 Merge pull request #1430 from t-woerner/ipaclient_test_ca_cert_files_test_fix
ipaclient_test: Drop extra ca_cert_files list test
v1.17.0
2026-07-22 15:19:02 -03:00
Thomas Woerner 817ac954ca ipaclient_test: Drop extra ca_cert_files list test
ca_cert_files is always a list of strings or None, therefore no
isinstance(options.ca_cert_files, list) test needed.

Fixes: #1425 (Fix ca_cert_files spec according to implementation)
2026-07-22 15:54:07 +02:00
Rafael Guterres JeffmanandGitHub 7ba279c09f Merge pull request #1429 from t-woerner/ansible_test_sanity_fixes
Ansible test sanity fixes
2026-07-22 08:35:34 -03:00
Thomas Woerner e0d70eeeea Fix latest ansible-test sanity findings
Some argument_spec and also DOCUMENTATION issues were fixed.

But also some recurring invalid-name findings like for example for the
__metaclass__ line needed to be "fixed".
2026-07-21 14:05:16 +02:00
Varun MylaraiahandGitHub 268d4822f1 Merge pull request #1427 from t-woerner/ipagroup_query
ipagroup: Use PARAM_MAPPING and query state support
2026-07-20 12:17:21 +05:30
Thomas Woerner 0e2e6a6653 ipagroup: Use PARAM_MAPPING and query state support
The ipagroup module has been reworked to use the new PARAM_MAPPING
added to ansible_freeipa_module.

The member handling for user, group, service and membermanager has
been simplified by using gen_member_add_del_lists. The member entries
in PARAM_MAPPING are now marked with "member": True. This replaces the
manual calls to gen_add_del_lists, gen_add_list and
gen_intersection_list across separate action/state branches with a
single unified call. externalmember and idoverrideuser are still
handled manually since they need SID-based comparison.

The new query state allows to retrieve group information from IPA.
The query_param option controls which fields are returned: BASE for
essential fields, ALL for all fields, PKEY_ONLY for group names only,
or a list of specific field names.

Here is the updated documentation of the module:

    README-group.md

New tests for the query state can be found at:

    tests/group/test_group_query.yml
2026-07-16 17:09:37 +02:00
Rafael Guterres JeffmanandGitHub a45b8f0715 Merge pull request #1411 from t-woerner/build_collection_update_for_aah
build-collection.sh: Rename base README.md to make it invisible for AAH
2026-07-15 14:50:11 -03:00
Rafael Guterres JeffmanandGitHub 79aed9ec84 Merge pull request #1428 from t-woerner/ipauser_query_fix
ipauser: Fix query state error handling and per-field conversion errors
2026-07-15 11:22:03 -03:00
Thomas Woerner 21258df45b ipauser: Fix query state error handling and per-field conversion errors
query_convert_result now reports the failing field name per-key instead
of aborting the whole loop with an unrelated try/except scope. main()
also rejects state=query with action=member and query is excluded from
rename's generated args and PARAM_MAPPING query fields.
2026-07-13 13:46:04 +02:00
Rafael Guterres JeffmanandGitHub 9f7bfb3ec4 Merge pull request #1422 from t-woerner/ipauser_query
Ipauser query
2026-07-10 00:12:10 -03:00
Thomas Woerner 5e057cfbcd test_group_case_insensitive.yml: Fix wrong user absent task
The task used a users dict with name, first and last name given
and state:absent. This combination does not make sense and was
silenty ignored before by ipauser module.
2026-07-09 13:53:24 +02:00
Thomas Woerner fcf4a60de6 ipauser: Use PARAM_MAPPING and query state support
The ipauser module has been reworked to use the new PARAM_MAPPING added
to ansible_freeipa_module.

The member handling for manager, principal, certificate and certmapdata
has been simplified by using gen_member_add_del_lists. The member
entries in PARAM_MAPPING are now marked with "member": True. This
replaces the manual calls to gen_add_del_lists, gen_add_list and
gen_intersection_list across three separate action/state branches with
a single unified call.

The new query state allows to retrieve user information from IPA.
The query_param option controls which fields are returned: BASE for
essential fields, ALL for all fields, PKEY_ONLY for user names only,
or a list of specific field names.

Here is the updated documentation of the module:

    README-user.md

New tests for the query state can be found at:

    tests/user/test_user_query.yml
2026-07-09 13:53:16 +02:00
Thomas Woerner 964345aed8 ansible_freeipa_module.py: New PARAM_MAPPING and query support
New functions and methods have been added to reduce code complexity
and duplication in several modules, as well as to enable query mode
in the modules.

New functions:

    gen_member_add_del_lists
        Compute member add/del lists for all member params marked with
        "member": True in PARAM_MAPPING. Handles sync, add-only and
        remove-only modes based on action and state.

    gen_member_args_from_mapping
        Build a member args dict for compare_args_ipa() from
        PARAM_MAPPING. Replaces per-module gen_member_args() functions.

New static methods:

    gen_args_from_mapping
        Generate IPA command args dict from PARAM_MAPPING. Replaces
        per-module gen_args() functions.

    extract_params
        Extract parameter values from module params using PARAM_MAPPING.

    extract_params_from_entry
        Extract parameter values from a users/hosts dict entry using
        PARAM_MAPPING.

    build_query_param_settings
        Build query parameter settings from PARAM_MAPPING and
        QUERY_FIELDS for use with execute_query.

New methods:

    execute_query
        Execute query state for modules supporting state: query.

    _extract_query_fields
        Extract requested fields from a query result using the mapping.

The params_fail_used_invalid method has been extended to accept optional
params and param_mapping arguments for use with extracted params dicts.

PARAM_MAPPING is an ordered dict that maps Ansible parameter names to
their metadata. Each entry is a dict with optional keys:

    "api_name"      IPA attribute name if different from the Ansible
                    parameter name.
    "gen_args"      Set to False to exclude the parameter from
                    gen_args_from_mapping (used for members and
                    parameters handled separately).
    "member"        Set to True to include the parameter in
                    gen_member_add_del_lists and
                    gen_member_args_from_mapping.
    "module_param"  Set to True for top-level module parameters that
                    are not part of the entity (e.g. action, state,
                    query_param, users).
    "return_only"   Set to True for parameters that are only returned
                    by IPA and never sent (excluded from
                    gen_args_from_mapping).
    "nonempty_list" Set to True if an empty list value should not be
                    sent to IPA.
    "lowercase"     Set to True to lowercase values before comparison.
    "convert_to"    Conversion type for the parameter value
                    (e.g. "str", "int", "bool").

An empty dict {} means the Ansible name equals the IPA attribute name
and the parameter is included in gen_args_from_mapping with no special
handling.

For query support a QUERY_FIELDS dict is needed with "prefix" for the
grouping key in PKEY_ONLY results, "primary_key" for the IPA name
attribute and "base" for the list of essential field names returned by
default.
2026-07-09 13:52:21 +02:00
Thomas Woerner 12bbf74d52 setup.cfg: Set max-public-methods to 25
With the updates for PARAM_MAPPING in IPAAnsibleModule it is needed to
increase max public methods.
2026-06-23 12:57:15 +02:00
Thomas Woerner 432c0b75fc Update pre-commit repo versions, deactivate parseable for ansible-lint
ansible-lint was updated to v26.4.0, yamllint to v1.38.0 and pylint to
v4.0.6.

parseable was deactivated in .ansible-lint as this option is not
supported any more.
2026-06-23 12:57:15 +02:00
Rafael Guterres JeffmanandGitHub 4f6575b30c Merge pull request #1418 from t-woerner/fix_ssh_public_key_tests_without_key_type_name
Fix SSH public key tests without key type name
2026-04-28 09:43:30 -03:00
Thomas Woerner ad4b343c7e Fix SSH public key tests without key type name
The tests using SSH public tests without using the "ssh-" key type name
are failing with latest Fedora versions.

The missing "ssh-rsa" key type name for the ssh public keys has been
added.
2026-04-27 09:44:05 +02:00
Rafael Guterres JeffmanandGitHub 62fd1551eb Merge pull request #1410 from t-woerner/infra_container_load_save
infra/image/shcontainer: New container_save and container_load
2026-02-12 09:36:23 -03:00
Thomas Woerner fe2e65bd35 build-collection.sh: Rename base README.md to make it invisible for AAH
AAH and also Galaxy are automatically trying to render the base README.md
file in the collection even if "readme" is set to another file in galaxy.yml.

Fixes:
1) README.md is renamed to README-COLLECTION.md
2) New README.md is generated with information about the rename and also
   pointing to the README-COLLECTION.md file in the collection and also
   the upstream documentation (versioned and latest).
3) Upstream "documentation" in galaxy.yml set to new README.md file.
2026-02-10 12:00:37 +01:00
Thomas Woerner a24e90ad0c infra/image/shcontainer: New container_save and container_load
The new container_save and container_load functions can be used to
save and load container images.

container_save
    Save a container image to a local file.
    Example: container_save "${name}"

container_load
    Load a container image from an tar archive.
    Example: local_image=$(container_load "${archive}")
2026-02-09 15:37:26 +01:00
Rafael Guterres JeffmanandGitHub 0b9718b3ec Merge pull request #1409 from t-woerner/utils_build_collection_command
Reworked and renamed script to generate Ansible collections
2026-01-22 08:54:35 -03:00
Thomas Woerner 226b8c4d75 Reworked and renamed script to generate Ansible collections
The script utils/build-galaxy-release.sh has been renamed to
utils/build-collection.sh, the script provides the same options, but
requires an extra argument now:

    build-collection.sh [options] rpm|aah|galaxy

The namespace and name are defined according to the argument:

    rpm     freeipa.ansible_freeipa   - General use and RPMs
    galaxy  freeipa.ansible_freeipa   - Ansible Galaxy
    aah     redhat.rhel_idm           - Ansible AutomationHub

The generated file README-COLLECTION.md is set in galaxy.yml as the
documentation entry point for the collections generated with aah and galaxy
as Ansible AutomationHub and also Ansible Galaxy are not able to render the
documentation README files in the collection properly.

The commit also changes the calls of utils/build-galaxy-release.sh to
utils/build-collection.sh.
2026-01-20 13:07:24 +01:00
Thomas WoernerandGitHub 2f34e1ac6a Merge pull request #1407 from rjeffman/ipaserver_firewalld_warning
Fix Ansible warnings in Firewall zone testing tasks
v1.16.0
2026-01-09 17:44:55 +01:00
Thomas WoernerandGitHub e4ea7c8983 Merge pull request #1382 from rjeffman/ipadnsrecord_a_rec_create_reverse
ipadnsrecord: Allow setting any IP address if create_reverse is false
2026-01-09 13:43:44 +01:00
Rafael Guterres Jeffman b3f024869c Fix Ansible warnings in Firewalld zone testing tasks
The firewalld zone verification tasks in ipaserver, ipareplica, and
ipabackup roles were triggering Ansible warnings due to variable
ipareplica_firewalld_zone not being defined when evaluating the task
name.

This fix remove the Jinja template from the task names and wrap the
tasks in a single block so the variable verification is done only once.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-08 15:24:07 -03:00
Rafael Guterres Jeffman 355438cea9 ipadnsrecord: Allow setting any IP address if create_reverse is false
Adding an A/AAAA record to a host fails if there's not a reverse zone
set that the resulting PTR record can be added to, even if
create_reverse is false.

Changing the rule to create the reverse record fixes the issue.

Fixes: #1381

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-08 10:18:46 -03:00
Thomas WoernerandGitHub 30b72422d9 Merge pull request #1372 from rjeffman/passkey_support
Add support for passkey
2026-01-07 20:22:46 +01:00
Thomas WoernerandGitHub 10a84429e2 Merge pull request #1394 from rjeffman/pre-commit-update
pre-commit: Update pre-commit repo versions
2026-01-07 18:12:09 +01:00
Rafael Guterres Jeffman bf384ab1aa New passkeyconfig management module
There is a new paskeyconfig management module placed in the plugins
folder:

    plugins/modules/ipapasskeyconfig.py

The paskeyconfig module allows to retrieve and modify global passkey
configuration attributes.

Here is the documentation of the module:

    README-passkeyconfig.md

New example playbooks have been added:

    playbooks/passkeyconfig/passkeyconfig-retrieve.yml
    playbooks/passkeyconfig/passkeyconfig-present.yml

New tests for the module can be found at:

    tests/passkeyconfig/test_passkeyconfig.yml
    tests/passkeyconfig/test_passkeyconfig_client_context.yml

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:32 -03:00
Rafael Guterres Jeffman 536b7cb5f3 ipauser: Add support for 'passkey' in 'user_auth_type'
The value 'passkey' was missing as a valid value for user_auth_type
attribute.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:16 -03:00
Rafael Guterres Jeffman 17b100baec ipaservice: Add support for 'passkey' in 'auth_ind'
The value 'passkey' was missing as a valid value for auth_ind attribute.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:16 -03:00
Rafael Guterres Jeffman 1488fb7b5e ipahost: Add support for 'passkey' in 'auth_ind'
The value 'passkey' was missing as a valid value for auth_ind attribute.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:16 -03:00
Rafael Guterres Jeffman a733c031b0 ipaconfig: Add support for 'passkey' in 'user_auth_type'
The value 'passkey' was missing as a valid value for user_auth_type
attribute.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:16 -03:00
Rafael Guterres Jeffman ff1a026ef4 tests: Add fact for passkey support
When testing passkey attributes some version of IPA do not support it,
se we need a fact that states that the support is available for proper
testing.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-07 11:13:16 -03:00
Rafael Guterres JeffmanandGitHub fa5d056e72 Merge pull request #1398 from t-woerner/sysaccount
Sysaccount management
2026-01-05 14:45:44 -03:00
Rafael Guterres JeffmanandGitHub e0e3cb041e Merge pull request #1405 from t-woerner/cert_new_invalid_profile_message
Cert tests: Do not fail on new dogtag profile not found error message
2026-01-05 14:38:24 -03:00
Thomas Woerner b54aaf127d README-role.md: Fix typo in action description
There was a typo in the description for action.
2026-01-05 18:22:44 +01:00
Thomas Woerner 4e16126b29 iparole: Add sysaccount member support
sysaccounts can now be used as a member for roles.

Example:

  - name: Ensure role my-app role has sysaccount member my-app
    iparole:
      name: my-app role
      sysaccount: my-app
      action: member

New tests for the module:

    tests/role/test_role_sysaccount_member.yml
2026-01-05 18:22:37 +01:00
Thomas Woerner ed62c2f1bf Cert tests: Do not fail on new dogtag profile not found error message
The error message for an invalid profile has changes in dogtag. The new
message is "Certificate operation cannot be completed: Unable to get
enrollment template for <profile name>: Profile not found"

Therefore the test is additionally checking for "Profile not found" now.
2026-01-05 16:39:07 +01:00
Thomas Woerner dc9b0ce4e8 New sysaccount management module
There is a new sysaccount management module placed in the plugins folder:

    plugins/modules/ipasysaccount.py

The sysaccount module allows to ensure presence or absence of system
accounts.

Here is the documentation for the module:

    README-sysaccount.md

New sysaccount example playbooks:

    playbooks/sysaccount/sysaccount-absent.yml
    playbooks/sysaccount/sysaccount-disabled.yml
    playbooks/sysaccount/sysaccount-enabled.yml
    playbooks/sysaccount/sysaccount-present.yml
    playbooks/sysaccount/sysaccount-privileged.yml
    playbooks/sysaccount/sysaccount-unprivileged.yml

New tests for the module:

    tests/sysaccount/test_sysaccount.yml
    tests/sysaccount/test_sysaccount_client_context.yml
2026-01-05 16:36:26 +01:00
Thomas WoernerandGitHub aa3bf1f015 Merge pull request #1406 from rjeffman/fix_checkpr_version_name
upstream ci: Use version_name for CheckPR labels
2026-01-05 16:35:23 +01:00
Rafael Guterres Jeffman f0aa531b28 upstream ci: Use version_name for CheckPR labels
As the ansible_version variable may contain a version specification, we
need a version_name to correctly report the job label in Azure.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2026-01-05 12:01:15 -03:00
Thomas WoernerandGitHub 6407fd8b2e Merge pull request #1404 from rjeffman/fix_pipeline_names
upstream ci: Fix Azure pipelines invalid names
2025-11-27 10:43:01 +01:00
Rafael Guterres Jeffman 2a1be13d3e upstream ci: Fix Azure pipelines invalid names
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
2025-11-24 13:25:26 -03:00