Skip to content
  1. Dec 16, 2020
  2. Nov 25, 2020
  3. 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
  4. Nov 21, 2020
  5. Nov 20, 2020
  6. Nov 19, 2020
  7. Nov 18, 2020
  8. 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
  9. 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
  10. Oct 29, 2020
  11. 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
  12. 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
  13. 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
  14. Sep 17, 2020
  15. 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
  16. 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
  17. 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
    • Rafael Guterres Jeffman's avatar
      Fix invalid forwarder list due to not using Unicode text. · 366e023d
      Rafael Guterres Jeffman authored
      When using ipadnsfowardzone with a target host that uses Python 2,
      it fails to add new zones due to unicode and str being different on
      that version. This patch fixes this behavior ensuring the module
      works on both Python verisons 2.7 and 3.x.
      366e023d
  18. Aug 17, 2020
    • Rafael Guterres Jeffman's avatar
      Document usage of `name_from_ip`. · 46bbc7bb
      Rafael Guterres Jeffman authored
      Since `name_from_ip` has a similar, but not equal, behavior to `name`,
      and as the inferred DNS zone might depend on DNS configuration and
      can be different than the user expects, it has some limited usage,
      and the user must be aware of its effects.
      
      This change to the documentation enhance the documentation including
      more details on the attribute usage.
      46bbc7bb
    • Rafael Guterres Jeffman's avatar
      Return the zone_name when adding a zone with name_from_ip. · 41e8226d
      Rafael Guterres Jeffman authored
      When adding a zone using the option name_from_ip, the user have
      little control over the final name of the zone, and if this name
      is to be used in further processing in a playbook it might lead to
      errors if the inferred name does not match what the user wanted to.
      
      By returning the actual inferred zone name, the name can be safely
      used for other tasks in the playbook.
      41e8226d
    • Rafael Guterres Jeffman's avatar
      Added support for client defined result data in FReeIPABaseModule · 531e544b
      Rafael Guterres Jeffman authored
      Modified support for processing result of IPA API commands so that
      client code can define its own processing and add return values to
      self.exit_args based on command result.
      
      If a subclass need to process the result of IPA API commands it should
      override the method `process_command_result`. The default implementation
      will simply evaluate if `changed` should be true.
      531e544b
    • Rafael Guterres Jeffman's avatar
      Add support for option `name_from_ip` in ipadnszone module. · abbd15e6
      Rafael Guterres Jeffman authored
      IPA CLI has an option `name_from_ip` that provide a name for a zone
      from the reverse IP address, so that it can be used to, for example,
      manage PTR DNS records.
      
      This patch adds a similar attribute to ipadnszone module, where it
      will try to find the proper zone name, using DNS resolve, or provide
      a sane default, if a the zone name cannot be resolved.
      
      The option `name_from_ip` must be used instead of `name` in playbooks,
      and it is a string, and not a list.
      
      A new example playbook was added:
      
          playbooks/dnszone/dnszone-reverse-from-ip.yml
      
      A new test playbook was added:
      
          tests/dnszone/test_dnszone_name_from_ip.yml
      abbd15e6
  19. Aug 14, 2020
  20. Aug 13, 2020
    • Thomas Woerner's avatar
      New location management module · 5ef6e61f
      Thomas Woerner authored
      There is a new location management module placed in the plugins folder:
      
          plugins/modules/ipalocation.py
      
      The location module allows to ensure presence or absence of locations.
      
      Here is the documentation for the module:
      
          README-location.md
      
      New example playbooks have been added:
      
          playbooks/location/location-absent.yml
          playbooks/location/location-present.yml
      
      New tests for the module:
      
          tests/location/test_location.yml
      5ef6e61f
    • Thomas Woerner's avatar
      New selfservice management module · 603f0c13
      Thomas Woerner authored
      There is a new selfservice management module placed in the plugins folder:
      
          plugins/modules/ipaselfservice.py
      
      The selfservice module allows to ensure presence and absence of selfservices
      and manage selfservice attributes.
      
      Here is the documentation for the module:
      
          README-selfservice.md
      
      New example playbooks have been added:
      
          playbooks/selfservice/selfservice-absent.yml
          playbooks/selfservice/selfservice-present.yml
          playbooks/selfservice/selfservice-member-absent.yml
          playbooks/selfservice/selfservice-member-present.yml
      
      New tests for the module:
      
          tests/selfservice/test_selfservice.yml
      603f0c13
    • Thomas Woerner's avatar
      New delegation management module · 64adb6c1
      Thomas Woerner authored
      There is a new delegation management module placed in the plugins folder:
      
          plugins/modules/ipadelegation.py
      
      The delegation module allows to ensure presence and absence of delegations
      and manage delegation attributes.
      
      Here is the documentation for the module:
      
          README-delegation.md
      
      New example playbooks have been added:
      
          playbooks/delegation/delegation-absent.yml
          playbooks/delegation/delegation-present.yml
          playbooks/delegation/delegation-member-absent.yml
          playbooks/delegation/delegation-member-present.yml
      
      New tests for the module:
      
          tests/delegation/test_delegation.yml
      64adb6c1
  21. Aug 11, 2020
    • Rafael Guterres Jeffman's avatar
      Fix `allow_retrieve_keytab_host` in service module. · b5e93c70
      Rafael Guterres Jeffman authored
      The attribute `allow_retrieve_keytab_host` was not working due to
      wrong processing of the input and verification if the values should
      be updated. Both the issues are fixed by this change.
      
      Tests were added to better verify service keytab members.
      b5e93c70
    • Rafael Guterres Jeffman's avatar
      Modified return value for ipavault module. · 7dd0b547
      Rafael Guterres Jeffman authored
      The ipavault module was returning a single string value when retrieving
      data. To keep consistency with other modules, it should return a dict
      with the `data` variable in it.
      
      This change modifies the result of ipavault to be a dict and also fixes
      relevant tests, examples and documentation.
      7dd0b547
  22. Aug 10, 2020
    • Rafael Guterres Jeffman's avatar
      Add support for parameter `rename` on ipahostgroup. · 16f67ce9
      Rafael Guterres Jeffman authored
      FreeIPA 4.8.7 introduced an option to rename an existing hostgroup.
      This patch adds support for renaming hostgroups if the option is
      available on installed IPA version.
      
      A new state `renamed` and a new option `rename` (alias: `new_name`)
      was added to module `ipahostgroup` to allow renaming of host groups.
      
      The implemented behavior is:
      * Rename if `name` exists and `rename` doesn't.
      * Do nothing if `name` does not exist and `rename` does, or if
        `name` equals to `rename`. (result.changed is False)
      * Fail if neither or both `name` and `rename` exist.
      16f67ce9
  23. Aug 06, 2020
    • Sergio Oliveira Campos's avatar
      Allow multiple dns zones to be absent. · 75d16c2d
      Sergio Oliveira Campos authored
      This PR allow ipadnszone module to ensure that multiple dns zones
      are absent at once, to be consistent with other ansible-freeipa
      modules.
      
      To fix this issue, it was required that custom arguents must be
      passed using keyword arguments so that `get_ipa_command_args()`
      is kept generic.
      75d16c2d
  24. Aug 05, 2020
Loading