From 25b94d1bf874e382c1bf3223cb20df5bf3b76fdc Mon Sep 17 00:00:00 2001
From: freezed <git-expect-noreply@freezed.me>
Date: Sun, 1 Jan 2023 01:10:41 +0100
Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20BASE=20Improve=20base=20tasks?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 tasks/host_info.yml |  4 ++--
 tasks/whoami.yml    | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tasks/host_info.yml b/tasks/host_info.yml
index e46c177..baaef92 100644
--- a/tasks/host_info.yml
+++ b/tasks/host_info.yml
@@ -3,6 +3,6 @@
   remote_user: "{{ my_user }}"
 
   tasks:
-    - name: Host Info
+    - name: ANSIBLE | host Info
       debug:
-        msg: "{{ ansible_hostname }} ({{ ansible_distribution }} {{ ansible_distribution_release }} v{{ ansible_distribution_version }})"
+        msg: "{{ ansible_host }}	{{ ansible_fqdn }}	- {{ ansible_distribution }} {{ ansible_distribution_release }} v{{ ansible_distribution_version }} / {{ ansible_processor[2] }} / {{ ansible_devices.keys() | max }}"
diff --git a/tasks/whoami.yml b/tasks/whoami.yml
index 7bc2b88..29bfdf2 100644
--- a/tasks/whoami.yml
+++ b/tasks/whoami.yml
@@ -7,15 +7,15 @@
   tasks:
     - name: Who is «remote_user»
       become: no
-      ansible.builtin.script:
-        cmd: /usr/bin/whoami
+      ansible.builtin.command:
+        cmd: whoami
       register: who_is_remote_user
       changed_when: 0
 
     - name: Who is «become_user»
-      become: yes
-      ansible.builtin.script:
-        cmd: /usr/bin/whoami
+      become: true
+      ansible.builtin.command:
+        cmd: whoami
       register: who_is_become_user
       changed_when: 0
 
-- 
GitLab