Hi Dip!

Assuming that you are referring to this code, note that that Ansible will run 
python on the target node - Python the interpreter itself will consume memory. 
And then if you run the shell module under Ansible, it will spawn a shell which 
itself will consume memory as well.

- Rilindo

> On Feb 8, 2022, at 8:46 AM, Dip Giri <[email protected]> wrote:
> 
> Whatever ansible give a memory info in ansible_fact it doesn't match with 
> memory info 
> that we get from free -m command. Why this problem happened for that if have 
> any solution plz give me 
> 
> ---
> - name: Setup server
> hosts: localhost
> tasks:
> 
> - name: test
> shell: free -m
> register: xyz
> 
> - name: Print service status
> debug:
> msg: "{{ansible_memory_mb.real}}"
> 
> - name: Print service status
> debug:
> msg: "{{xyz.stdout.split('\n')}}"
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/74109954-cb3c-4b72-a5b0-34f9e425f16fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/ansible-project/74109954-cb3c-4b72-a5b0-34f9e425f16fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/BD74359A-3C8D-4DFE-8A50-6FDF2A48A4F7%40gmail.com.

Reply via email to