Replacing ansible.builtin.shell with ansible.builtin.command
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -5,36 +5,36 @@
|
|||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Show system CPU info
|
- name: Show system CPU info
|
||||||
ansible.builtin.shell: lscpu
|
ansible.builtin.command: lscpu
|
||||||
register: shell_result
|
register: cmd_output
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Print stdout to terminal
|
- name: Print stdout to terminal
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
var: shell_result.stdout_lines
|
var: cmd_output.stdout_lines
|
||||||
|
|
||||||
- name: RAM Info
|
- name: RAM Info
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Show free and used memory
|
- name: Show free and used memory
|
||||||
ansible.builtin.shell: free -h
|
ansible.builtin.command: free -h
|
||||||
register: shell_result
|
register: cmd_output
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Print stdout to terminal
|
- name: Print stdout to terminal
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
var: shell_result.stdout_lines
|
var: cmd_output.stdout_lines
|
||||||
|
|
||||||
- name: Disk Info
|
- name: Disk Info
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Show mounted disks and their usage
|
- name: Show mounted disks and their usage
|
||||||
ansible.builtin.shell: df -h
|
ansible.builtin.command: df -h
|
||||||
register: shell_result
|
register: cmd_output
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Print stdout to terminal
|
- name: Print stdout to terminal
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
var: shell_result.stdout_lines
|
var: cmd_output.stdout_lines
|
||||||
|
|||||||
Reference in New Issue
Block a user