I'd use facts for that. The ones you want are probably

ansible_memtotal_mb

(total RAM in Mb)

and

ansible_mounts

(which gives free bytes per mounted device)

On 26 April 2017 at 15:16, Swathi Cutie <[email protected]> wrote:
> How to write an ansible task to check if the physical memory >=128 MB and
> free disk is >= 256 MB. i tried to get the output but i am not sure how to
> proceed further.
>
>
> # Check the physical disk memory 128 MB and free disk 256 MB
>  - name: check the physical memory
>    command: free -m
>    register: phy_mem
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e1c356ca-d4a1-4462-93b0-988d4de133c6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAK5eLPSd91qNzJHti6tirRu2ng_G1HnKk506PBsVrMNSTKhiaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to