On Wed, Mar 25, 2020 at 10:41:35PM -0700, Shifa Shaikh wrote:
> ---
> hosts: remote_hosts
> tasks:
> - name: Generate JSON data
> lineinfile:
> path: "{{ playbook_dir }}/tmpfiles/stats.yml"
> line: "{{ inventory_hostname }}_{{ item.mount }}: {{ (100 *
>
Below playbook gets the disk usage percentage of '/tmp' from a list of
remote_hosts [20 remote servers] and stores it locally (delegate_to) in a
file {{ playbook_dir }}/tmpfiles/stats.yml
---
hosts: remote_hosts
tasks:
- name: Generate JSON data
lineinfile:
path: "{{