Files
ansible/playbooks/sysinfo.yml
T
gballan de98fe2057
ci/woodpecker/push/woodpecker Pipeline was successful
Replacing ansible.builtin.shell with ansible.builtin.command
2026-09-23 21:54:49 -04:00

41 lines
872 B
YAML

---
- name: CPU Info
hosts: all
become: true
tasks:
- name: Show system CPU info
ansible.builtin.command: lscpu
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines
- name: RAM Info
hosts: all
become: true
tasks:
- name: Show free and used memory
ansible.builtin.command: free -h
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines
- name: Disk Info
hosts: all
become: true
tasks:
- name: Show mounted disks and their usage
ansible.builtin.command: df -h
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines