mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-10 02:35:54 +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
22 lines
718 B
YAML
22 lines
718 B
YAML
---
|
|
- block:
|
|
- name: Get Domain from server name
|
|
ansible.builtin.set_fact:
|
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
|
when: "'fqdn' in ansible_facts"
|
|
- name: Set Domain to 'ipa.test' if FQDN could not be retrieved.
|
|
ansible.builtin.set_fact:
|
|
ipaserver_domain: "ipa.test"
|
|
when: "'fqdn' not in ansible_facts"
|
|
when: ipaserver_domain is not defined
|
|
|
|
- name: Set ipaserver_realm.
|
|
ansible.builtin.set_fact:
|
|
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
|
when: ipaserver_realm is not defined
|
|
|
|
- name: Create FQDN for host01
|
|
ansible.builtin.set_fact:
|
|
host1_fqdn: "host01.{{ ipaserver_domain }}"
|
|
host2_fqdn: "host02.{{ ipaserver_domain }}"
|