From d5269c83e616f3244647dc215fdb018a961351d3 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 20 Dec 2022 13:54:42 +0100
Subject: [PATCH] trust: 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
---
 tests/trust/test_trust.yml                | 14 +++++++-------
 tests/trust/test_trust_client_context.yml |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/trust/test_trust.yml b/tests/trust/test_trust.yml
index 5d1280d0..f998c6fc 100644
--- a/tests/trust/test_trust.yml
+++ b/tests/trust/test_trust.yml
@@ -28,7 +28,7 @@
         state: absent
 
     - name: Clear test idranges
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa idrange-del {{ adserver.realm }}_id_range || true
         ipa idrange-del {{ ipaserver.realm }}_subid_range || true
@@ -48,7 +48,7 @@
       failed_when: result.failed or not result.changed
 
     - name: check if 'ipa-ad-trust' trust exists
-      shell: |
+      ansible.builtin.shell: |
         echo 'SomeADMINpassword' | kinit admin
         ipa trust-find
         kdestroy -c test_krb5_cache -q -A
@@ -77,7 +77,7 @@
       failed_when: result.failed or not result.changed
 
     - name: Check if 'ipa-ad-trust' trust was removed
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa trust-find
         kdestroy -c test_krb5_cache -q -A
@@ -94,7 +94,7 @@
       failed_when: result.failed or result.changed
 
     - name: Clear test idranges
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa idrange-del {{ adserver.realm }}_id_range || true
         ipa idrange-del {{ ipaserver.realm }}_subid_range || true
@@ -113,7 +113,7 @@
       failed_when: result.failed or not result.changed
 
     - name: Check if 'ipa-ad-trust-posix' trust exists
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa trust-find
         kdestroy -c test_krb5_cache -q -A
@@ -142,7 +142,7 @@
       failed_when: result.failed or not result.changed
 
     - name: Check if trust 'ipa-ad-trust-posix' was removed
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa trust-find
         kdestroy -c test_krb5_cache -q -A
@@ -159,7 +159,7 @@
       failed_when: result.failed or result.changed
 
     - name: Clear test idranges
-      shell: |
+      ansible.builtin.shell: |
         kinit -c test_krb5_cache admin <<< SomeADMINpassword
         ipa idrange-del {{ adserver.realm }}_id_range || true
         ipa idrange-del {{ ipaserver.realm }}_subid_range || true
diff --git a/tests/trust/test_trust_client_context.yml b/tests/trust/test_trust_client_context.yml
index 6f4ff06e..c60f9d88 100644
--- a/tests/trust/test_trust_client_context.yml
+++ b/tests/trust/test_trust_client_context.yml
@@ -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 trust using client context, in client host.
-  import_playbook: test_trust.yml
+  ansible.builtin.import_playbook: test_trust.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test trust using client context, in server host.
-  import_playbook: test_trust.yml
+  ansible.builtin.import_playbook: test_trust.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
   vars:
     ipa_context: client
-- 
GitLab