Added a basic sysinfo playbook to show hardware information about systems
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user