mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
server: 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:
@@ -9,21 +9,21 @@
|
||||
# CLEANUP TEST ITEMS
|
||||
- block:
|
||||
- name: Get server name from hostname
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}"
|
||||
rescue:
|
||||
- name: Fallback to 'ipaserver'
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipa_server_name: ipaserver
|
||||
when: ipa_server_name is not defined
|
||||
|
||||
- block:
|
||||
- name: Get domain name from hostname.
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
|
||||
rescue:
|
||||
- name: Fallback to 'ipa.test'
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_domain: "ipa.test"
|
||||
when: ipaserver_domain is not defined
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
tasks:
|
||||
- name: Include FreeIPA facts.
|
||||
include_tasks: ../env_freeipa_facts.yml
|
||||
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.
|
||||
@@ -27,13 +27,13 @@
|
||||
# in upstream CI.
|
||||
|
||||
- name: Test server using client context, in client host.
|
||||
import_playbook: test_server.yml
|
||||
ansible.builtin.import_playbook: test_server.yml
|
||||
when: groups['ipaclients']
|
||||
vars:
|
||||
ipa_test_host: ipaclients
|
||||
|
||||
- name: Test server using client context, in server host.
|
||||
import_playbook: test_server.yml
|
||||
ansible.builtin.import_playbook: test_server.yml
|
||||
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
||||
vars:
|
||||
ipa_context: client
|
||||
|
||||
Reference in New Issue
Block a user