From 78a7bcc8f407881205536ef2012f13107af1209b Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 23 Sep 2026 21:37:40 -0400 Subject: [PATCH] Added a basic sysinfo playbook to show hardware information about systems --- playbooks/sysinfo.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 playbooks/sysinfo.yml diff --git a/playbooks/sysinfo.yml b/playbooks/sysinfo.yml new file mode 100644 index 0000000..eb7b4c2 --- /dev/null +++ b/playbooks/sysinfo.yml @@ -0,0 +1,40 @@ +--- + +- name: CPU Info + hosts: all + become: true + tasks: + - name: Show system CPU info + ansible.builtin.shell: lscpu + register: shell_result + changed_when: false + + - name: Print stdout to terminal + ansible.builtin.debug: + var: shell_result.stdout_lines + +- name: RAM Info + hosts: all + become: true + tasks: + - name: Show free and used memory + ansible.builtin.shell: free -h + register: shell_result + changed_when: false + + - name: Print stdout to terminal + ansible.builtin.debug: + var: shell_result.stdout_lines + +- name: Disk Info + hosts: all + become: true + tasks: + - name: Show mounted disks and their usage + ansible.builtin.shell: df -h + register: shell_result + changed_when: false + + - name: Print stdout to terminal + ansible.builtin.debug: + var: shell_result.stdout_lines