Better output for ad-hoc commands?

Is there any way to get Ansible to provide cleaner/human readable output when running ad-hoc commands? Sometimes, particularly when output of a process is voluminous, it drops newlines and munges everything together. Using -v doesn’t help.

Thanks,

Alex

There is not currently.

The output is basically JSON though for command/shell modules it presents things a bit more organized.

Open to thoughts though!

Not core Ansible, but you can take a look at https://github.com/dominis/ansible-shell - it looks a bit better, but still won’t help you with big amount of hosts.

Alex Scoble bloggingitguy@gmail.com napisał:

Yeah there are some comments on the PR about ansible-shell about what it takes to get this into core.

All being said, it’s a different way of operations.

Thanks Tomasz,

I’ll try it and let you all know if it solves my problem, but just playing with it for a few moments it does look pretty cool.

Thanks,

Alex

Tomasz,

Is there any better documentation for ansible-shell available anywhere? They don’t explain at all what the serial setting is for or how to pass commands to the current group.

Thanks,

Alex

Figured out that “serial” is number of forks. I kind of guessed, but didn’t want to assume anything.

Thanks,

Alex

Tomasz,

Unfortunately, it looks like currently there’s no way to set ansible-shell to do --sudo-ask-pass or --ask-pass which makes it a non-starter for our network.

Thanks,

Alex

Hi, ansible-shell is not part of ansible (yet anyway), so the best place to ask questions about it would be it’s github tracker.