From f0e309753157b6d6613f55f3e1cb6e6f0b91ea3d Mon Sep 17 00:00:00 2001 From: Zakaria Date: Tue, 27 Aug 2024 04:47:31 +0000 Subject: [PATCH] Update test.yml --- test.yml | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/test.yml b/test.yml index 0f3cbf2..bbf9e1c 100644 --- a/test.yml +++ b/test.yml @@ -4,38 +4,7 @@ become: false tasks: - - name: Ping the servers - ansible.builtin.ping: - - - name: Gather system information - ansible.builtin.setup: - gather_subset: - - 'network' - - 'hardware' - - 'virtualization_type' - - 'virtualization_role' - - - name: Display the hostname - ansible.builtin.debug: - msg: "Hostname: {{ ansible_hostname }}" - - - name: Display the operating system - ansible.builtin.debug: - msg: "Operating System: {{ ansible_distribution }} {{ ansible_distribution_version }}" - - - name: Display the virtualization type - ansible.builtin.debug: - msg: "Virtualization Type: {{ ansible_virtualization_type }}" - - - name: Display the virtualization role - ansible.builtin.debug: - msg: "Virtualization Role: {{ ansible_virtualization_role }}" - - - name: Display the uptime - ansible.builtin.command: - cmd: uptime - register: uptime_result - - - name: Show the uptime - ansible.builtin.debug: - msg: "Uptime: {{ uptime_result.stdout }}" + - name: Update and upgrade packages + ansible.builtin.apt: + update_cache: yes + upgrade: full