From 72b4b89116fd6e34050deb92da3c42b10a9615ea Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 20 Dec 2022 13:50:46 +0100
Subject: [PATCH] idrange: 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/idrange/tasks_set_trust.yml             |  4 ++--
 tests/idrange/test_idrange.yml                | 20 +++++++++----------
 tests/idrange/test_idrange_client_context.yml |  6 +++---
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tests/idrange/tasks_set_trust.yml b/tests/idrange/tasks_set_trust.yml
index 4c414bbe..bb81bf30 100644
--- a/tests/idrange/tasks_set_trust.yml
+++ b/tests/idrange/tasks_set_trust.yml
@@ -23,7 +23,7 @@
   failed_when: result.failed
 
 - name: Retrieve Domain Security Identifier
-  shell:
+  ansible.builtin.shell:
     cmd: |
       kinit -c test_krb5_cache admin <<< SomeADMINpassword > /dev/null
       KRB5CCNAME=test_krb5_cache ipa trust-show {{ adserver.domain }} | sed -n "/Domain Security Identifier/s/ //gp" | cut -d":" -f2
@@ -32,5 +32,5 @@
   no_log: yes
 
 - name: Set ipa_domain_sid.
-  set_fact:
+  ansible.builtin.set_fact:
     ipa_domain_sid: "{{ getsid.stdout }}"
diff --git a/tests/idrange/test_idrange.yml b/tests/idrange/test_idrange.yml
index 5c4da940..32a3231f 100644
--- a/tests/idrange/test_idrange.yml
+++ b/tests/idrange/test_idrange.yml
@@ -14,7 +14,7 @@
   tasks:
   # CLEANUP TEST ITEMS
   - name: Remove test trust.
-    include_tasks: tasks_remove_trust.yml
+    ansible.builtin.include_tasks: tasks_remove_trust.yml
     when: trust_test_is_supported | default(false)
 
   - name: Ensure testing idranges are absent
@@ -121,7 +121,7 @@
   - block:
       # Create trust with range_type: ipa-ad-trust
       - name: Create trust with range_type 'ipa-ad-trust'
-        include_tasks: tasks_set_trust.yml
+        ansible.builtin.include_tasks: tasks_set_trust.yml
         vars:
           trust_base_id: 10000000
           trust_range_size: 200000
@@ -218,7 +218,7 @@
 
       # Remove trust and idrange
       - name: Remove test trust.
-        include_tasks: tasks_remove_trust.yml
+        ansible.builtin.include_tasks: tasks_remove_trust.yml
 
       - name: Ensure AD-trust idrange is absent
         ipaidrange:
@@ -229,7 +229,7 @@
 
       # Create trust with range_type: ipa-ad-trust-posix
       - name: Create trust with range_type 'ipa-ad-trust'
-        include_tasks: tasks_set_trust.yml
+        ansible.builtin.include_tasks: tasks_set_trust.yml
         vars:
           trust_base_id: 10000000
           trust_range_size: 200000
@@ -251,7 +251,7 @@
 
       # Remove trust and idrange
       - name: Remove test trust.
-        include_tasks: tasks_remove_trust.yml
+        ansible.builtin.include_tasks: tasks_remove_trust.yml
 
       - name: Ensure AD-trust idrange is absent
         ipaidrange:
@@ -262,7 +262,7 @@
 
       # Remove trust and idrange
       - name: Remove test trust.
-        include_tasks: tasks_remove_trust.yml
+        ansible.builtin.include_tasks: tasks_remove_trust.yml
 
       - name: Ensure AD-trust idrange is absent
         ipaidrange:
@@ -273,7 +273,7 @@
 
       # Create trust with range_type: ipa-ad-trust-posix
       - name: Create trust with range_type 'ipa-ad-trust-posix'
-        include_tasks: tasks_set_trust.yml
+        ansible.builtin.include_tasks: tasks_set_trust.yml
         vars:
           trust_base_id: 10000000
           trust_range_size: 2000000
@@ -319,7 +319,7 @@
 
       # Remove trust and idrange
       - name: Remove test trust.
-        include_tasks: tasks_remove_trust.yml
+        ansible.builtin.include_tasks: tasks_remove_trust.yml
 
       - name: Ensure AD-trust idrange is absent
         ipaidrange:
@@ -330,7 +330,7 @@
 
       # Create trust with range_type: ipa-ad-trust-posix
       - name: Create trust with range_type 'ipa-ad-trust-posix'
-        include_tasks: tasks_set_trust.yml
+        ansible.builtin.include_tasks: tasks_set_trust.yml
         vars:
           trust_base_id: 10000000
           trust_range_size: 2000000
@@ -352,7 +352,7 @@
     always:
       # CLEANUP TEST ITEMS
       - name: Remove test trust.
-        include_tasks: tasks_remove_trust.yml
+        ansible.builtin.include_tasks: tasks_remove_trust.yml
 
       - name: Ensure testing idranges are absent
         ipaidrange:
diff --git a/tests/idrange/test_idrange_client_context.yml b/tests/idrange/test_idrange_client_context.yml
index e0f4447a..71f188d6 100644
--- a/tests/idrange/test_idrange_client_context.yml
+++ b/tests/idrange/test_idrange_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 idrange using client context, in client host.
-  import_playbook: test_idrange.yml
+  ansible.builtin.import_playbook: test_idrange.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test idrange using client context, in server host.
-  import_playbook: test_idrange.yml
+  ansible.builtin.import_playbook: test_idrange.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
-- 
GitLab