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
72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
# Setup environment for service module tests.
|
|
---
|
|
- name: Setup variables and facts.
|
|
ansible.builtin.include_tasks: env_vars.yml
|
|
|
|
# Cleanup before setup.
|
|
- name: Cleanup test environment.
|
|
ansible.builtin.include_tasks: env_cleanup.yml
|
|
|
|
- name: Add IP address for "nohost" host.
|
|
ipadnsrecord:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
zone_name: "{{ test_domain }}."
|
|
name: nohost
|
|
a_ip_address: "{{ ipv4_prefix + '.100' }}"
|
|
|
|
- name: Add hosts for tests.
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
hosts:
|
|
- name: "{{ host1_fqdn }}"
|
|
ip_address: "{{ ipv4_prefix + '.101' }}"
|
|
- name: "{{ host2_fqdn }}"
|
|
ip_address: "{{ ipv4_prefix + '.102' }}"
|
|
- name: "{{ svc_fqdn }}"
|
|
ip_address: "{{ ipv4_prefix + '.201' }}"
|
|
- name: svc.ihavenodns.info
|
|
force: yes
|
|
update_dns: yes
|
|
|
|
- name: Ensure testing user user01 is present.
|
|
ipauser:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: user01
|
|
first: user01
|
|
last: last
|
|
|
|
- name: Ensure testing user user02 is present.
|
|
ipauser:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: user02
|
|
first: user02
|
|
last: last
|
|
|
|
- name: Ensure testing group group01 is present.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: group01
|
|
|
|
- name: Ensure testing group group02 is present.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: group02
|
|
|
|
- name: Ensure testing hostgroup hostgroup01 is present.
|
|
ipahostgroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: hostgroup01
|
|
|
|
- name: Ensure testing hostgroup hostgroup02 is present.
|
|
ipahostgroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: hostgroup02
|