mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
role: 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
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
---
|
||||
- block:
|
||||
- name: Get Domain from server name
|
||||
set_fact:
|
||||
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.
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_domain: "ipa.test"
|
||||
when: "'fqdn' not in ansible_facts"
|
||||
when: ipaserver_domain is not defined
|
||||
|
||||
- name: Set ipaserver_realm.
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
||||
when: ipaserver_realm is not defined
|
||||
|
||||
- name: Create FQDN for host01
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
host1_fqdn: "host01.{{ ipaserver_domain }}"
|
||||
host2_fqdn: "host02.{{ ipaserver_domain }}"
|
||||
|
||||
Reference in New Issue
Block a user