From feadbfce95f1668ebbde31086a14fc9ff8d39003 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 20 Dec 2022 13:54:01 +0100
Subject: [PATCH] servicedelegation*: 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
---
 .../test_servicedelegationrule_client_context.yml         | 6 +++---
 .../test_servicedelegationrule_hostprincipal.yml          | 8 ++++----
 .../test_servicedelegationtarget_client_context.yml       | 6 +++---
 .../test_servicedelegationtarget_hostprincipal.yml        | 8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/servicedelegationrule/test_servicedelegationrule_client_context.yml b/tests/servicedelegationrule/test_servicedelegationrule_client_context.yml
index 03546ffc..4e633728 100644
--- a/tests/servicedelegationrule/test_servicedelegationrule_client_context.yml
+++ b/tests/servicedelegationrule/test_servicedelegationrule_client_context.yml
@@ -8,7 +8,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.
@@ -29,11 +29,11 @@
 # in upstream CI.
 
 - name: Test servicedelegationrule using client context, in client host.
-  import_playbook: test_servicedelegationrule.yml
+  ansible.builtin.import_playbook: test_servicedelegationrule.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test servicedelegationrule using client context, in server host.
-  import_playbook: test_servicedelegationrule.yml
+  ansible.builtin.import_playbook: test_servicedelegationrule.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
diff --git a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml
index f0f79a76..4d0bd764 100644
--- a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml
+++ b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml
@@ -6,7 +6,7 @@
 
   tasks:
   # setup
-  - include_tasks: ../env_freeipa_facts.yml
+  - ansible.builtin.include_tasks: ../env_freeipa_facts.yml
 
   # host principals are only possible with IPA 4.9.0+
   - block:
@@ -14,17 +14,17 @@
     # SET FACTS
 
     - name: Get Domain from server name
-      set_fact:
+      ansible.builtin.set_fact:
         ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
       when: ipaserver_domain is not defined
 
     - name: Get REALM from server name
-      set_fact:
+      ansible.builtin.set_fact:
         ipaserver_realm: "{{ ipaserver_domain | upper }}"
       when: ipaserver_realm is not defined
 
     - name: Set test-host fqdn
-      set_fact:
+      ansible.builtin.set_fact:
         test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
         test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
 
diff --git a/tests/servicedelegationtarget/test_servicedelegationtarget_client_context.yml b/tests/servicedelegationtarget/test_servicedelegationtarget_client_context.yml
index 04927b93..cf1a9d9e 100644
--- a/tests/servicedelegationtarget/test_servicedelegationtarget_client_context.yml
+++ b/tests/servicedelegationtarget/test_servicedelegationtarget_client_context.yml
@@ -8,7 +8,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.
@@ -29,11 +29,11 @@
 # in upstream CI.
 
 - name: Test servicedelegationtarget using client context, in client host.
-  import_playbook: test_servicedelegationtarget.yml
+  ansible.builtin.import_playbook: test_servicedelegationtarget.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test servicedelegationtarget using client context, in server host.
-  import_playbook: test_servicedelegationtarget.yml
+  ansible.builtin.import_playbook: test_servicedelegationtarget.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
diff --git a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml
index f59d0c45..aedfc697 100644
--- a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml
+++ b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml
@@ -6,7 +6,7 @@
 
   tasks:
   # setup
-  - include_tasks: ../env_freeipa_facts.yml
+  - ansible.builtin.include_tasks: ../env_freeipa_facts.yml
 
   # host principals are only possible with IPA 4.9.0+
   - block:
@@ -14,17 +14,17 @@
     # SET FACTS
 
     - name: Get Domain from server name
-      set_fact:
+      ansible.builtin.set_fact:
         ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
       when: ipaserver_domain is not defined
 
     - name: Get REALM from server name
-      set_fact:
+      ansible.builtin.set_fact:
         ipaserver_realm: "{{ ipaserver_domain | upper }}"
       when: ipaserver_realm is not defined
 
     - name: Set test-host fqdn
-      set_fact:
+      ansible.builtin.set_fact:
         test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
         test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
 
-- 
GitLab