Skip to content
  1. May 25, 2021
  2. May 21, 2021
  3. May 20, 2021
    • Thomas Woerner's avatar
      host: Fix DNS resource record not found error · c8eb6d74
      Thomas Woerner authored
      The "DNS resource record not found" error occurs when a host arecord
      or aaaarecord member is ensured to be absent and no dnsrecord entry
      for the host exists.
      
      The arecord or aaaarecord item are removed from dnsrecord_args if the
      record is not defined in res_find_dnsrecord.
      c8eb6d74
    • Thomas Woerner's avatar
      ipasudorule: Fix category reset for idempotency · 34bd2562
      Thomas Woerner authored
      A repeated category reset of usercategory, hostcategory, cmdcaterory,
      runasusercategory and hostcategory is resulting in the error
      "no modifications to be performed".
      
      The empty categories are now removed from the args if the category is
      not set in the sudorule.
      34bd2562
  4. May 18, 2021
    • Thomas Woerner's avatar
      New server management module · 16795b8b
      Thomas Woerner authored
      There is a new server management module placed in the plugins folder:
      
          plugins/modules/ipaserver.py
      
      The server module allows to ensure presence and absence of servers. The
      module requires an existing server, the deployment of a new server can
      not be done with the module.
      
      DNSName has been added to ansible_freeipa_module in plugins/module_utils
      as this is used for locations.
      
      Here is the documentation for the module:
      
          README-server.md
      
      New example playbooks have been added:
      
          playbooks/server/server-absent-continue.yml
          playbooks/server/server-absent-force.yml
          playbooks/server/server-absent-ignore_last_of_role.yml
          playbooks/server/server-absent-ignore_topology_disconnect.yml
          playbooks/server/server-absent.yml
          playbooks/server/server-hidden.yml
          playbooks/server/server-location.yml
          playbooks/server/server-no-location.yml
          playbooks/server/server-no-service-weight.yml
          playbooks/server/server-not-hidden.yml
          playbooks/server/server-present.yml
          playbooks/server/server-service-weight.yml
      
      New tests for the module:
      
          tests/server/test_server.yml
      
      Change in module_utils/ansible_freeipa_module:
      
          DNSName is imported from ipapython.dnsutil and also added to __all__
      16795b8b
  5. May 11, 2021
  6. May 05, 2021
    • Rafael Guterres Jeffman's avatar
      Fix creation of privilege with permissions. · f4a8cf4e
      Rafael Guterres Jeffman authored
      Module was raising exceptions when trying to create a new privilege
      with permissions. This change fixes the behavior and ensuure
      idempotence with trying to create a privilege with the same values.
      
      Tests for this behavior have been appended to:
      
          tests/privilege/test_privilege.yml
      f4a8cf4e
    • Rafael Guterres Jeffman's avatar
      Fix compare_args_ipa when passing None as parameter. · c17e9fe2
      Rafael Guterres Jeffman authored
      There were no test for the arguments of compare_args_ipa() to check
      if they were `None`, and they were used in contexts where `None`
      would raise exceptions.
      
      A test was added to return `False` if only one of the parameters is
      `None`, and `True` if both are None.
      c17e9fe2
  7. May 04, 2021
    • Rafael Guterres Jeffman's avatar
      Force plugins to execute using LANGUAGE='C'. · 09942c3d
      Rafael Guterres Jeffman authored
      IPA translates exception messages and Ansible uses controller's
      language to execute plugins on target hosts, and since ansible-freeipa
      uses Exceptions messages to detect some errors and/or states, using any
      language that has a translation for the required messages may cause the
      plugin to misbehave.
      
      This patch modifies ansible_freeipa_module in plugin/module_utils to
      force the use of "C" as the language by setting the environment variable
      LANGUAGE.
      
      Tests were added to verify the correct behavior:
      
          tests/environment/test_locale.yml
      
      The first test will fail, if ansible_freeipa_module is not patched, with
      the message:
      
         host_show failed: nonexistent: host nicht gefunden
      
      This issue is not present if the language selected does not provide
      a translation for the eror message.
      
      This patch does not fix encoding issues that might occur in certain
      releases (e.g.: CentOS 8.3).
      
      Fix #516
      09942c3d
  8. Feb 16, 2021
  9. Jan 26, 2021
    • Eric Nothen's avatar
      ipasudorule: Fix names of member objects. · 2cc4c27f
      Eric Nothen authored
      Fixed names of sudorule member objects, as they did not match the names provided by IdM.
      
      From:			To:
      member_host		memberhost_host
      member_hostgroup	memberhost_hostgroup
      member_user		memberuser_user
      member_group		memberuser_group
      
      Fixes: #500
      2cc4c27f
  10. Jan 12, 2021
  11. Jan 08, 2021
    • Thomas Woerner's avatar
      ipapermission: Fix attrs and drop privilege handling · 23829c5e
      Thomas Woerner authored
      The attrs handling was not complete and did not support to ensure presence
      or absence of attributes with action:member.
      
      The includedattrs and excludedattrs parameters have not been added with
      this change as the use of attrs will automatically set includedattrs and
      excludedattrs. The includedattrs and excludedattrs parameters are only
      usable for managed permissions and duplicating attrs.
      
      The permission module may not handle privileges. An IPA internal only API
      has been used for this. The prvilege variable and all related code paths
      have been removed.
      
      Fixes: #424 ([Permission Handling] Not able to add additional attributes
                   with existing attributes)
      Fixes: #425 ([Permission Handling] Not able to add member privilege while
                   adding permission)
      23829c5e
  12. 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
  13. Jan 04, 2021
    • Rafael Guterres Jeffman's avatar
      Fix changing the type of an existing Vault. · 7e04a46f
      Rafael Guterres Jeffman authored
      Current implementation does not allow the change of an existingi Vault
      type. To allow it, data is retrieved from the current vault, the vault
      is modifiend, and then, data is stored again in the new vault.
      
      Due to changing the process of modifying a vault, this change also
      fixes the update of asymmetric vault keys. To change the key used,
      the task must provide the old private key, used to retrieve data,
      and the new public_key, used to store the data again. A new alias
      was added to public_key (new_public_key) and public_key_file
      (new_public_key_file) so that the playbook better express the
      intention of the tak.
      
      Vault tests have been updated to better test against the new update
      process, and a new test file has bee added:
      
          tests/vault/test_vault_change_type.
      7e04a46f
  14. Dec 29, 2020
  15. Dec 22, 2020
    • Rafael Guterres Jeffman's avatar
      Fix handling members in ipa role. · 67179a8c
      Rafael Guterres Jeffman authored
      When adding new members to a role, the existing members were removed.
      The correct behavior for the "member" action is to add those members,
      and substitute the existing ones. This patch fixes this behavior.
      
      Fix #409, #411, #412, #413
      67179a8c
  16. Dec 16, 2020
  17. Nov 25, 2020
  18. Nov 24, 2020
    • Rafael Guterres Jeffman's avatar
      ipahost: fix adding host for servers without DNS configuration. · 92972fd1
      Rafael Guterres Jeffman authored
      When using ipahost module with servers where DNS was not configured
      it failed to add hosts due to an exception raised on `dnsrecord_show`
      that was not being correctly handled.
      
      As the exception was being handled twice, the This patch simply removes
      one of the handlers, allowing the exception to propagate to the caller,
      where it is handled.
      
      Fixes issue #434.
      92972fd1
  19. Nov 21, 2020
  20. Nov 20, 2020
  21. Nov 19, 2020
  22. Nov 18, 2020
  23. Nov 16, 2020
    • Rafael Guterres Jeffman's avatar
      ipapermission: add version check for bind type 'self' · b6cf3e5f
      Rafael Guterres Jeffman authored
      FreeIPA 4.8.7 has introduced bind type 'self' as a valid value, and
      this PR adds checks so the module fails early if the value is used
      with an unsupported version.
      
      Tests and documentation have been updated to reflect the changes.
      b6cf3e5f
    • Rafael Guterres Jeffman's avatar
      Add FreeIPA version check to module_utils.ansible_freeipa_module. · 2aaabc77
      Rafael Guterres Jeffman authored
      Some attribute values are only accepted for specific FreeIPA versions,
      for example `self` for permission's `bindtype`. Although there are
      options to check for command and parameter availability, there is no
      check for verifying if a value should be accepted.
      
      This patch add a function to evaluate the target FreeIPA host version,
      by comparing a giver version to the current installed one.
      
      The version evaluation uses Python packaging's version comparision,
      which is compatible with PEP 440, if available. If not available, it
      falls back to a string split, that will work for the most common cases,
      but might fail for versions including strings with `rc` or `dev`, for
      example.
      2aaabc77
  24. Nov 13, 2020
    • Rafael Guterres Jeffman's avatar
      Bypass Ansible filtering on data returned by the module. · 88f84cef
      Rafael Guterres Jeffman authored
      Due to Ansible filtering out values in the output that might be match
      values in sensible attributes that have `no_log` set, if a module need
      to return data to the controller, it cannot rely on
      `ansible_module.exit_json` if there is a chance that a partial match
      may occur.
      
      See: https://github.com/ansible/ansible/issues/71789
      
      The change provided here uses the same implementation that is used on
      Ansible's `AnsibleModule.exit_json`, without the data filtering layer,
      so every attribute with be printed and, therefore, logged by Ansible.
      
      This is needed for the Vault module, as we need to return values that
      are explicit requested by the user and that might, at least partially,
      match the values in attributes with `no_log` set.
      
      Tests that reproduced the issue, and show it was fixed were provided
      for all Vault types.
      88f84cef
  25. Oct 29, 2020
  26. Oct 23, 2020
    • Seth Kress's avatar
      New Permission management module · 8a8487ed
      Seth Kress authored
      There is a new permission management module placed in the plugins folder:
      
          plugins/modules/ipapermission.py
      
      The permission module allows to ensure presence of absence of permissions
      and manage permission members.
      
      Here is the documentation for the module:
      
          README-permission.md
      
      New example plabooks have been added:
      
          playbooks/permission/permission-absent.yml
          playbooks/permission/permission-allow-read-employeenum.yml
          playbooks/permission/permission-member-absent.yml
          playbooks/permission/permission-member-present.yml
          playbooks/permission/permission-present.yml
          playbooks/permission/permission-renamed.yml
      
      New tests for the module:
      
          tests/permission/test_permission.yml
      8a8487ed
  27. 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
  28. Sep 21, 2020
    • Thomas Woerner's avatar
      Fix module documentation · cf9fb2e8
      Thomas Woerner authored
      ansible-doc is reporting several issues in modules. Most of them have benn
      due to misspelled description key word or due to use of multi line text
      without the | in the description line.
      cf9fb2e8
  29. Sep 17, 2020
  30. Sep 04, 2020
    • Rafael Guterres Jeffman's avatar
      Fixed log of vault data return when retrieving to a file. · 1f666609
      Rafael Guterres Jeffman authored
      When retrieving data from a vault using `out` to store the data in a
      file resulted is random characters being returned and logged. These
      characters could generate a traceback print from Ansible's logger,
      without breaking the script.
      
      The reason for that is that the result from `vault_retrive` was being
      processed when it was not needed, and data was beeing returned, when
      it shouldn't.
      
      This patch fixes this behavior by supressing the return data when `data`
      is not available, and only raising an error if it should be available.
      1f666609
    • Rafael Guterres Jeffman's avatar
      New privilege management module · 19a94ac4
      Rafael Guterres Jeffman authored
      There is a new privilege management module placed in the plugins folder:
      
          plugins/modules/ipaprivilege.py
      
      The privilege module allows to ensure presence or absence of privilege
      and manage privilege permission memebers.
      
      Here is the documentation for the module:
      
          README-privilege.md
      
      New example playbooks have been added:
      
          playbooks/privilege/privilege-absent.yml
          playbooks/privilege/privilege-member-absent.yml
          playbooks/privilege/privilege-member-present.yml
          playbooks/privilege/privilege-present.yml
      
      New tests for the module:
      
          tests/privilege/test_privilege.yml
      19a94ac4
  31. Sep 03, 2020
    • Rob Verduijn's avatar
      New trust management module · b2fd94e7
      Rob Verduijn authored
      There is a new trust management module placed in the plugins folder:
      plugins/modules/trust.py
      The trust module allows to ensure presence and absence of trusts.
      
      Here is the documentation for the module:
      README-trust.md
      
      New example playbooks have been added:
      playbooks/trust/add-trust.yml
      playbooks/trust/del-trust.yml
      New tests added for the module:
      tests/hbacrule/test_trust.yml
      b2fd94e7
  32. Aug 23, 2020
    • Rafael Guterres Jeffman's avatar
      Fix ipavault vault_type under Python 2.7. · 8b06e31e
      Rafael Guterres Jeffman authored
      When running module ipavault with Python 2.7, due to differences in
      the handling of unicode string than in Python 3, the vault_type type
      was different than the required.
      
      This patch changes the default value to force a unicode string in
      the supported versions of Python, fixing the module when Python 2
      is used.
      8b06e31e
Loading