<snipping out verbose output from previous posts>

Hi Brian,

I am concerned with ansible-playbook, and so I'll restrict my observations 
to the context of playbook executions only.

I examined the source code and there is a marked difference in the way the 
apt and yum modules deal with the outputs captured from their respective 
actions. The difference is in what is passed to the  exit_json() call which 
passes information back to playbook.

   1. apt.py sends stdout in a key called stdout and stderr in a key called 
   stderr
   2. yum.py, on the other hand, puts stdout into a results key and stderr 
   into the msg key

playbook/__init__.py contains instructions to split anything returned as 
stdout into lines, and put that into stdout_lines, which is what we want.

Therefore I feel that the yum module is behaving in a non-standard way here 
and its information returning style must be revised to make it more aligned 
with what the apt module does. If this seems like the right course of 
action, I can work on the yum module code and submit a PR.

Awaiting your comments/suggestions.

Regards,
Sankalp

On Tuesday, 11 November 2014 07:25:12 UTC-6, Brian Coca wrote:
>
> open a feature request on github for the ansible-modules-core project, 
> this should not be hard to add
>
> On Mon, Nov 10, 2014 at 9:21 PM, Sankalp Khare <[email protected] 
> <javascript:>> wrote:
>
> In comparison, here is the output of the apt module, with the stdout_lines 
> field that I find readable:
>
> TASK: [apt upgrade=dist] 
> ******************************************************
>
> changed: [ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com]
>
>
> TASK: [debug var=apt_out] 
> *****************************************************
>
> ok: [ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com] => {
>
>     "apt_out": {
>
>         "changed": true,
>
>         "invocation": {
>
>             "module_args": "upgrade=dist",
>
>             "module_name": "apt"
>
>         },
>
>         "msg": "Reading package lists...\nBuilding dependency 
> tree...\nReading state information...\nThe following NEW packages will be 
> installed:\n  linux-headers-3.13.0-39 linux-headers-3.13.0-39-generic\n 
>  linux-image-3.13.0-39-generic\nThe following packages will be upgraded:\n 
>  accountsservice apport apt apt-transport-https apt-utils base-files 
> bsdutils\n  byobu cloud-init curl dbus dpkg file gcc-4.9-base 
> gir1.2-glib-2.0 
>
> ...

-- 
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/95b4a868-2c51-471a-9f65-89c4a1ae1689%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to