5 Commits

Author SHA1 Message Date
Thomas Woerner
adc262bcb0 location: Use FQCN for ansible.builtin
Use Fully Qualified Collection Name (FQCN) for ansible builtins. This is
ansible.builtin.set_fact instead of set_fact for example and aplies for
all actions that are part of ansible.builtin.

All the replaced ansible.builtins:
  assert, command, copy, debug, fail, fetch, file, import_playbook,
  import_tasks, include_role, include_tasks, include_vars, package,
  set_fact, shell, slurp, stat, systemd
2022-12-20 13:50:58 +01:00
Rafael Guterres Jeffman
16db503929 Fix execution of client context tests.
When running the tests that can be executed either on server or client
context, without defining 'ipa_context', the context is automatically
identified.

Currently, the tests in upstream CI run only on a server, and the
context is identified as "server" context, and in order to run the test
using a client context 'ipa_context' must be set to 'client'.

This patch fixes all the client context tests by correctly setting
ipa_context when running the client context tests in a server host.
2021-09-30 19:30:53 -03:00
Rafael Guterres Jeffman
1440fb39b2 ipalocation: Allow execution of plugin in client host.
Update location README file and add tests for executing plugin with
`ipaapi_context` set to `client`.

A new test playbook can be found at:

    tests/location/test_location_client_context.yml

The new test file can be executed in a FreeIPA client host that is
not a server. In this case, it should be defined in the `ipaclients`
group, in the inventory file.
2021-09-28 10:19:43 -03:00
Rafael Guterres Jeffman
b7722a476f Missing admin passwords in location module.
Tests for module ipalocation failed due to missing ipaadmin_password.

Added the variable to the playbooks, and also fixed the examples and
documentation. Some playbooks had identation fixed to two spaces
instead of one for consistency with other modules.
2020-08-14 12:32:51 -03:00
Thomas Woerner
5ef6e61f77 New location management module
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
2020-08-13 16:56:30 +02:00