I am tryig to write an Ansible script which will Generat Alert on Disk 
Usage. Once the Disk Usage goes above the Threshold, alert will be 

Below is start up code.

 - hosts: "{{ hostGroup }}"
   user: gamesroot
   become: true
   become_user: root
   gather_facts: no
   - shell: df -h "{{ item }}" | tail -n 1 | awk {'print $5 '}  | sed 
      - /
      - /home
      - /backup
     register: test

   - debug:
       msg: "{{ test.results|map(attribute='stdout')|list }}"
   - name: Size is big
     shell: echo "tobig size "
     when: test.results > 20

Here Problem isi  not able to Register Value and Compare it with Threshold. 

PLEASE help me for the SAME.

You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to