collect process data
This commit is contained in:
parent
6ad0af7134
commit
0a321f2acb
@ -25,12 +25,37 @@
|
|||||||
- name: lsblk
|
- name: lsblk
|
||||||
shell: lsblk
|
shell: lsblk
|
||||||
register: lsblk_output
|
register: lsblk_output
|
||||||
|
become: yes
|
||||||
- name: Store results
|
- name: Store results
|
||||||
copy:
|
copy:
|
||||||
content: "{{lsblk_output.stdout}}"
|
content: "{{lsblk_output.stdout}}"
|
||||||
dest: "{{ inventory_hostname }}/lsblk.out"
|
dest: "{{ inventory_hostname }}/lsblk.out"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
|
- name: Collect netstat
|
||||||
|
block:
|
||||||
|
- name: Run command
|
||||||
|
shell: netstat -peanut
|
||||||
|
register: netstat_output
|
||||||
|
become: yes
|
||||||
|
- name: Store results
|
||||||
|
copy:
|
||||||
|
content: "{{netstat_output.stdout}}"
|
||||||
|
dest: "{{ inventory_hostname }}/netstat.out"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
|
- name: Collect process data
|
||||||
|
block:
|
||||||
|
- name: Run command
|
||||||
|
shell: ps aux
|
||||||
|
register: ps_output
|
||||||
|
become: yes
|
||||||
|
- name: Store results
|
||||||
|
copy:
|
||||||
|
content: "{{ps_output.stdout}}"
|
||||||
|
dest: "{{ inventory_hostname }}/ps.out"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Get users
|
- name: Get users
|
||||||
get_users:
|
get_users:
|
||||||
#min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}"
|
#min_uid: "{{ (ansible_os_family == 'RedHat') | ternary(500,1000) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user