mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
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
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
- name: Test dnsforwardzone
|
|
hosts: ipaclients, ipaserver
|
|
become: no
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
- name: Include FreeIPA facts.
|
|
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
|
|
|
|
# Test will only be executed if host is not a server.
|
|
- name: Execute with server context in the client.
|
|
ipadnsforwardzone:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: server
|
|
name: ThisShouldNotWork
|
|
register: result
|
|
failed_when: not (result.failed and result.msg is regex("No module named '*ipaserver'*"))
|
|
when: ipa_host_is_client
|
|
|
|
# Import basic module tests, and execute with ipa_context set to 'client'.
|
|
# If ipaclients is set, it will be executed using the client, if not,
|
|
# ipaserver will be used.
|
|
#
|
|
# With this setup, tests can be executed against an IPA client, against
|
|
# an IPA server using "client" context, and ensure that tests are executed
|
|
# in upstream CI.
|
|
|
|
- name: Test dnsforwardzone using client context, in client host.
|
|
ansible.builtin.import_playbook: test_dnsforwardzone.yml
|
|
when: groups['ipaclients']
|
|
vars:
|
|
ipa_test_host: ipaclients
|
|
|
|
- name: Test dnsforwardzone using client context, in server host.
|
|
ansible.builtin.import_playbook: test_dnsforwardzone.yml
|
|
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
|
vars:
|
|
ipa_context: client
|