Skip to content
Snippets Groups Projects
  1. Jan 31, 2025
    • Rafael Guterres Jeffman's avatar
      ipagroup: Fix management of AD objects · 6925503a
      Rafael Guterres Jeffman authored
      When using AD objects, a user expects to use the more human readable
      form, like "user@ad.domain", but this impose some dificulties on
      evaluating which object is being referenced as AD has several forms to
      refer to the same object.
      
      Each object is AD is identified uniquely by its SID, and this is the
      identifier that IPA stores in its database. When managing AD objects,
      IPA finds its SID and works with that value.
      
      ansible-freeipa tried to process these objects using the human readable
      values, and it cause idempontence error when ensuring the values were
      present or modified, and, at least in some cases, prevented the objects
      to be made absent, as the object list created didn't match the SID to
      the value used as module parameter.
      
      By using SID to process the AD objects in ipagroup, the addition or
      removal of members works and idempotence of these members is ensured.
      
      The only issue with thils approach is that it only works no server
      nodes. In client nodes, the conversion to SID is not available and the
      same issues that existed before will still be present.
      
      Tests were updated to reflect these changes, a new test, specific to
      idempotence issues of AD objects was added:
      
         tests/group/test_group_ad_users.yml
      
      Resolves: https://issues.redhat.com/browse/RHEL-70023
      6925503a
  2. Dec 10, 2024
    • Rafael Guterres Jeffman's avatar
      ipagroup: Correctly handle externalmember in member actions · 431dc866
      Rafael Guterres Jeffman authored
      When creating the lists of external members, the attribute
      'ipaexternalmember' also needs to be added to the list of external
      members that are part of the group object for external groups.
      
      A test to verify the correct behavior was added and the test suite for
      group external members have been cleaned up with 'yes' values changed to
      'true' and the use of module_defaults.
      431dc866
  3. May 22, 2024
  4. Feb 12, 2024
  5. Dec 20, 2023
    • Rafael Guterres Jeffman's avatar
      ipagroup: Add support for renaming groups · 1ecdbd3a
      Rafael Guterres Jeffman authored
      FreeIPA suports renaming groupobjects with the CLI parameter "rename",
      and this parameter was missing in ansible-freeipa ipagroup module.
      
      This patch adds support for a new state 'renamed' and the 'rename'
      parameter.
      
      Tests were updated to cope with the changes.
      1ecdbd3a
  6. Apr 04, 2023
  7. Apr 03, 2023
    • Thomas Woerner's avatar
      ipagroup: Fix ensuring external group group members (without trust-ad) · 80abf635
      Thomas Woerner authored
      Due to an API misbehaviour in FreeIPA, ipaexternalmembers need to be
      treated differently than other group members parameters. Even an empty
      array triggers all tests for external members, including the check for
      installed dcerpc bindings.
      
      Therefore ipagroup module has been changed to not set ipaexternalmember
      to an empty list if there are no external members to be added or
      removed.
      80abf635
  8. Sep 30, 2022
    • Thomas Woerner's avatar
      ipagroup: Fix documentation sections and agument spec · 93c134b6
      Thomas Woerner authored
      ansible-test with ansible-2.14 is adding a lot of new tests to ensure
      that the documentation section and the agument spec is complete. Needed
      changes:
      
      DOCUMENTATION section
      
      - `type: str` needs to be set for string parameters
      - `type: int` needs to be set for integer parameters
      - `type: list` needs to be set for list parameters
      - `elements: str` needs to be given for list of string parameters
      - `required` tags need to be fixed according to the `argument_spec`
      - `aliases` tag needs to match `argument_spec`
      - `authors` needs to be given with the github user also: `Name (@user)`
      
      argument_spec
      
      - `elements="str"` needs to be added to all list of string parameters
      
      The `copyright` date is extended with `-2022`.
      93c134b6
  9. Aug 26, 2022
  10. Apr 27, 2022
    • Rafael Guterres Jeffman's avatar
      Add support for managing idoverrideusers in ipagroup. · 099eb96b
      Rafael Guterres Jeffman authored
      The group CLI option `idoverrideusers` was not supported by
      ansible-freeipa, and this patch adds support to it.
      
      Tests require an AD trust, and a user `aduser@ad.ipa.test` to exist, or
      the user name must be provided (variable, CLI)  through `test_ad_user`.
      
      A new test playbook was added:
      
          tests/group/test_group_idoverrideuser.yml
      099eb96b
  11. Jan 24, 2022
  12. Jan 11, 2022
    • Rafael Guterres Jeffman's avatar
      ipagroup: Refactor and fix group member management. · 3b08edda
      Rafael Guterres Jeffman authored
      Currently, when adding an overlapping set of members causes playbook to
      fail as the already existing members are added twice.
      
      This patch refactors membership management by removing duplicate logic
      and handling all changes to members in a single place. This change
      removed code that was causing the execution failures.
      3b08edda
  13. Dec 14, 2021
  14. Nov 24, 2021
  15. Oct 01, 2021
  16. Sep 16, 2021
    • Thomas Woerner's avatar
      group: Fix nonposix, posix and external handling and conversions · 1f250243
      Thomas Woerner authored
      The nonposix, posix and external parameters need to be mutually
      exclusive. external was missing in this list. Only one of the three
      parameters can be used.
      
      external can not be set to no/false. This results in an error now.
      
      if nonposix is used, posix is set as not nonposix. The nonposix
      parameter is not used within the code anymore..
      
      New tests have been added to tests the addition of users with for
      nonposix and posix groups. The tests for the external group is not
      active due to the need of an AD.
      
      Fixes: #528 (Error creating nonposix group)
      1f250243
  17. Sep 07, 2021
    • Thomas Woerner's avatar
      group: Use execute_ipa_commands · 19073730
      Thomas Woerner authored
      execute_ipa_commands replces the check mode exit, the loop over the
      generated commands and also in the member failure handling for modules
      with member support.
      19073730
  18. Sep 02, 2021
    • Thomas Woerner's avatar
      group: Use IPAAnsibleModule class · 31ee4f9b
      Thomas Woerner authored
      ipaadmin_variables are handled by IPAAnsibleModule,
      ansible_module.params_get is used to get the parameters and
      ansible_module.ipa_connect is used to simplify the module.
      31ee4f9b
  19. May 26, 2021
    • Thomas Woerner's avatar
      group: Reduce addition and deletion of members to changed only · 0a604fca
      Thomas Woerner authored
      Use gen_add_list and gen_intersection_list for user, group, service,
      externalmember, membermanager_user and membermanager_group member
      handling.
      The functions are used to reduce the add lists to the new entries
      only and the delete lists to the entries that are in the user and
      the show list result.
      
      This enables to remove the ignores for "already a member" and
      "not a member" errors..
      0a604fca
  20. May 25, 2021
  21. Jan 06, 2021
    • Eric Nothen's avatar
      Enabled Ansible check_mode · 7bbb401b
      Eric Nothen authored
      Added code to the ipa* plugins to support Ansible's check_mode, by
      means of a clean exit before the execution of the actual list of
      commands that would otherwise create/update/delete IPA servers
      and/or its resources.
      7bbb401b
  22. Oct 14, 2020
    • Rafael Guterres Jeffman's avatar
      Add support for adding external members to ipagroup. · c7db1878
      Rafael Guterres Jeffman authored
      This patch add support for adding external members to ipagroup which
      have the `external` attribute set. It adds another attribute to the
      module, `external_members`, which is a list of users or groups from
      an external trust, to be added to the group.
      
      This patch requires server-trust-ad to be tested, as such, the tests
      have been guarded by a test block, for when such tests are available
      in ansible-freeipa CI.
      
      Fixes issue #418
      c7db1878
  23. Jul 27, 2020
    • Rafael Guterres Jeffman's avatar
      Add support for IPA CLI option `posix`. · 8c889e9b
      Rafael Guterres Jeffman authored
      This patch adds suport for the IPA CLI option `posix` when modifying
      an existing group. Also, enhances verification of `external` and
      `posix/non-posix` groups to avoid unneded API failures (e.g. when
      no change to the posix/external status is needed).
      
      A new test was added:
      
          tests/group/test_group_external_nonposix.yml
      8c889e9b
  24. Jun 29, 2020
    • Thomas Woerner's avatar
      ipa[host]group: Fix membermanager unknow user issue · 6132a947
      Thomas Woerner authored
      If a unknown membermanager user presence will be ensured, the unknown user
      error was ignored. This has been fixed in ipagroup. The code for the error
      handling in ipagroup and ipahostgroup has been adapted because of this.
      
      New tests for tests/[host]group/test_[host]group_membermnager.yml have been
      added.
      6132a947
  25. Jun 09, 2020
    • Thomas Woerner's avatar
      ipagroup: Add support for group membership management · 0acf576d
      Thomas Woerner authored
      A group membership manager is a user or a group that can add members to
      a group or remove members from a group.
      
      This is related to https://pagure.io/freeipa/issue/8114
      
      New parameters have been added to the module:
      - `membermanager_user`: List of member manager users assigned to this
        group. Only usable with IPA versions 4.8.4 and up.
      - `membermanager_group`: List of member manager groups assigned to this
        group. Only usable with IPA versions 4.8.4 and up.
      
      These parameters behave like member parameters.
      
      A new test has been added:
      - tests/group/test_group_membermanager.yml
      0acf576d
  26. May 11, 2020
  27. May 06, 2020
    • Thomas Woerner's avatar
      Do not remove member attributes while updating others · 457050c6
      Thomas Woerner authored
      Because of a missing check member attributes (for use with action: member)
      are cleared when a non-member attribute is changed. The fix simply adds a
      check for None (parameter not set) to gen_add_del_lists in
      ansible_freeipa_module to make sure that the parameter is only changed if
      it should be changed.
      
      All places where the add and removal lists have been generated manually
      have been changed to also use gen_add_del_lists.
      
      Resolves: #252 (The "Manager" attribute is removed when updating any user
                      attribute)
      457050c6
  28. Apr 26, 2020
  29. Feb 26, 2020
  30. Oct 30, 2019
    • Thomas Woerner's avatar
      ipagroup: Fix changed flag, new test cases · ff9ce6b8
      Thomas Woerner authored
      The changed flag returned by ipagroup calls have not been correct. This
      change fixes this. Addtitionally new test cases have been added to make
      sure that the changed flag is correct.
      ff9ce6b8
    • Thomas Woerner's avatar
      ipagroup: Properly support IPA versions 4.6 and RHEL-7 · a4a15def
      Thomas Woerner authored
      group_add_member is only supporting services in more recent IPA versions.
      This is 4.7+. Code has been added to detect if services are supported by
      the used IPA version and used in the parameters of the module. In this case
      an error is printed.
      
      Additionally all parameters will be get from the module using
      module_params_get provided by ansible_freeipa_module. Additional to_text
      conversions have been removed as they are not needed anymore with this.
      a4a15def
  31. Oct 01, 2019
    • Thomas Woerner's avatar
      ipagroup: Rework to use same mechanisms as ipahostgroup module · c5e0b1b4
      Thomas Woerner authored
      The ipagroup module was not using the failed and completed items in the dict
      that is returned with api_command. But it was creating add and remove
      lists for users, groups and services. This is not needed if the failures
      "already a member" and "not a member" in the result failures are ignored.
      Only other failures are reported.
      c5e0b1b4
  32. Sep 24, 2019
    • Thomas Woerner's avatar
      ipagroup: Remove unused member_[present,absent] states · e814b1fa
      Thomas Woerner authored
      The states member_present and member_absent are not used and should also not
      be used. This is a remain of the first try to ensure absence and presence
      of users (members) in the group. This has been replaced with the setting
      action: member.
      e814b1fa
  33. Aug 12, 2019
  34. Jul 11, 2019
Loading