Hi,

I've been trying to get some helpful output from playbook runs that use the 
yum and apt modules.

When I register the results of an invocation of these modules, I notice 
that the apt module very conveniently returns a "stdout_lines" field which 
contains something that is much more readable than "msg" or "stdout", which 
contain literal "\n"s. But the yum module does not have any such field in 
its results. There is only a "results" field which is not formatted in a 
very readable way:

ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com | success >> {
>
>     "changed": true,
>
>     "msg": "",
>
>     "rc": 0,
>
>     "results": [
>
>         "Loaded plugins: priorities, update-motd, upgrade-helper\n1018 
>> packages excluded due to repository priority protections\nResolving 
>> Dependencies\n--> Running transaction check\n---> Package at.x86_64 
>> 0:3.1.10-43.8.amzn1 will be updated\n---> Package at.x86_64 
>> 0:3.1.10-43.11.amzn1 will be an update\n---> Package audit.x86_64 
>> 0:2.3.2-3.19.amzn1 will be updated\n---> Package audit.x86_64 
>> 0:2.3.3-4.21.amzn1 will be an update\n---> Package audit-libs.i686 
>> 0:2.3.2-3.19.amzn1 will be updated\n---> Package audit-libs.x86_64 
>> 0:2.3.2-3.19.amzn1 will be updated\n---> Package audit-libs.i686 
>> 0:2.3.3-4.21.amzn1 will be an update\n---> Package audit-libs.x86_64 
>> 0:2.3.3-4.21.amzn1 will be an update\n---> Package aws-amitools-ec2.noarch 
>> 0:1.5.2-0.0.amzn1 will be updated\n---> Package aws-amitools-ec2.noarch 
>> 0:1.5.6-1.1.amzn1 will be an update\n---> Package aws-apitools-as.noarch 
>> 0:1.0.61.5-1.0.amzn1 will be updated\n---> Package aws-apitools-as.noarch 
>> 0:1.0.61.6-1.0.amzn1 will be an update\n---> Package 
>> aws-apitools-ec2.noarch 0:1.6.13.0-1.1.amzn1 will be updated\n---> Package 
>> aws-apitools-ec2.noarch 0:1.7.1.3-1.0.amzn1 will be an update\n---> Package 
>> aws-apitools-elb.noarch 0:1.0.34.0-1.0.amzn1 will be updated\n---> Package 
>> aws-apitools-elb.noarch 0:1.0.35.0-1.0.amzn1 will be an update\n---> 
>> Package aws-apitools-rds.noarch 0:1.15.001-1.0.amzn1 will be updated\n---> 
>> Package aws-apitools-rds.noarch 0:1.18.001-1.0.amzn... <AND SO ON>
>
>
I'm snipping the rest of it, but you get the idea.

Is it possible to introduce a "stdout_lines" in the output of the yum 
module as well?

Thanks!

-- 
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 
https://groups.google.com/d/msgid/ansible-project/27d81129-6bab-4288-b850-501c4751f7cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to