From defd1e4e92a924da8bd09d4375ea964e83914c42 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 20 Dec 2022 13:51:21 +0100
Subject: [PATCH] netgroup: 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/netgroup/test_netgroup.yml                       |  2 +-
 tests/netgroup/test_netgroup_client_context.yml        | 10 +++++-----
 tests/netgroup/test_netgroup_member.yml                |  4 ++--
 tests/netgroup/test_netgroup_member_absent.yml         |  4 ++--
 .../netgroup/test_netgroup_member_case_insensitive.yml |  6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tests/netgroup/test_netgroup.yml b/tests/netgroup/test_netgroup.yml
index d4ac69e9..ffc8cef1 100644
--- a/tests/netgroup/test_netgroup.yml
+++ b/tests/netgroup/test_netgroup.yml
@@ -19,7 +19,7 @@
 
     # CREATE TEST ITEMS
     - 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
 
diff --git a/tests/netgroup/test_netgroup_client_context.yml b/tests/netgroup/test_netgroup_client_context.yml
index f5a4dd3a..8d92ee6f 100644
--- a/tests/netgroup/test_netgroup_client_context.yml
+++ b/tests/netgroup/test_netgroup_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,25 +27,25 @@
 # in upstream CI.
 
 - name: Test netgroup using client context, in client host.
-  import_playbook: test_netgroup.yml
+  ansible.builtin.import_playbook: test_netgroup.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test netgroup using client context, in server host.
-  import_playbook: test_netgroup.yml
+  ansible.builtin.import_playbook: test_netgroup.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
   vars:
     ipa_context: client
 
 - name: Test netgroup with member using client context, in client host.
-  import_playbook: test_netgroup_member.yml
+  ansible.builtin.import_playbook: test_netgroup_member.yml
   when: groups['ipaclients']
   vars:
     ipa_test_host: ipaclients
 
 - name: Test netgroup with member using client context, in server host.
-  import_playbook: test_netgroup_member.yml
+  ansible.builtin.import_playbook: test_netgroup_member.yml
   when: groups['ipaclients'] is not defined or not groups['ipaclients']
   vars:
     ipa_context: client
diff --git a/tests/netgroup/test_netgroup_member.yml b/tests/netgroup/test_netgroup_member.yml
index c8365422..ac67fbe8 100644
--- a/tests/netgroup/test_netgroup_member.yml
+++ b/tests/netgroup/test_netgroup_member.yml
@@ -7,12 +7,12 @@
   tasks:
   - block:
     - 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: Set host1_fqdn .. host2_fqdn
-      set_fact:
+      ansible.builtin.set_fact:
         host1_fqdn: "{{ 'host1.' + ipaserver_domain }}"
         host2_fqdn: "{{ 'host2.' + ipaserver_domain }}"
 
diff --git a/tests/netgroup/test_netgroup_member_absent.yml b/tests/netgroup/test_netgroup_member_absent.yml
index 14376cd2..2da3125b 100644
--- a/tests/netgroup/test_netgroup_member_absent.yml
+++ b/tests/netgroup/test_netgroup_member_absent.yml
@@ -7,12 +7,12 @@
   tasks:
   - block:
     - 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: Set host1_fqdn .. host2_fqdn
-      set_fact:
+      ansible.builtin.set_fact:
         host1_fqdn: "{{ 'host1.' + ipaserver_domain }}"
         host2_fqdn: "{{ 'host2.' + ipaserver_domain }}"
 
diff --git a/tests/netgroup/test_netgroup_member_case_insensitive.yml b/tests/netgroup/test_netgroup_member_case_insensitive.yml
index abd12593..62aadc52 100644
--- a/tests/netgroup/test_netgroup_member_case_insensitive.yml
+++ b/tests/netgroup/test_netgroup_member_case_insensitive.yml
@@ -16,7 +16,7 @@
   - block:
     # SETUP
     - 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
 
@@ -62,7 +62,7 @@
 
     # TESTS
     - name: Start tests.
-      debug:
+      ansible.builtin.debug:
         msg: "Tests are starting."
 
     - name: Ensure netgroups exist
@@ -203,7 +203,7 @@
       failed_when: result.failed or result.changed
 
     - name: End tests.
-      debug:
+      ansible.builtin.debug:
         msg: "All tests executed."
 
     always:
-- 
GitLab