@Edgars, this is a great answer to my Q2 ;-) And of course this is a much
better way of getting this kind of information and I'm confused why I did
it in such a complicated way. This solved the problem I'm having nicely,
thanks a lot.
However, just to make sure that we do not run into unintended issues
elsewhere, this issue just made me wonder how I could force language to
English for Ansible sessions just to make sure I always operate in a
defined environment. If anyone knew, I'd be glad to receive a hint.
Am Mittwoch, 27. April 2016 10:26:28 UTC+2 schrieb Edgars:
>
> Sorry, I don't have answer to your questions but I wonder why are you
> using shell module for this task? Why don't you just:
>
> ansible host01 -m setup -a "filter=ansible_memfree_mb"
>
> or in playbook:
>
> setup: filter=ansible_memfree_mb
>
>
> Edgars
>
>
> trešdiena, 2016. gada 27. aprīlis 08:15:31 UTC+2, Jürgen Haas rakstīja:
>>
>> My task calls this
>>
>> shell: free | awk '/Mem:/ {print $4}'
>>
>>
>> and the output is empty. Up until Version 2.0.1.0 this correctly output
>> the 4th string of the second line from the free command.
>>
>> When changing that to
>>
>> shell: echo "free | awk '/Mem:/ {print $4}'" > /tmp/output
>>
>>
>> we get
>> free | awk '/Mem:/ {print }'
>>
>> in the file /tmp/out which demonstrates that the $4 is skipped for some
>> not obvious reason.
>>
>> Q1: Is this a new bug?
>>
>> Q2: Is there any other way to get the result from the "free" output?
>>
>
--
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/a40b9cfd-27b8-414b-95b2-350c578584d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.