# Better output for ad-hoc commands?

**URL:** <https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647>\
**Category:** Ansible Project\
**Created:** [October 30, 2014, 6:26pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647 "2014-10-30T18:26:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Scoble](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Alex\_Scoble](https://forum.ansible.com/u/Alex_Scoble)\
**Post date:** [October 30, 2014, 6:26pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/1 "2014-10-30T18:26:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 7:42pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/2 "2014-10-30T19:42:56Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Tomasz\_Kontusz](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tomasz\_Kontusz](https://forum.ansible.com/u/Tomasz_Kontusz)\
**Post date:** [October 30, 2014, 8:17pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/3 "2014-10-30T20:17:51Z")

</div>

Not core Ansible, but you can take a look at [https://github.com/dominis/ansible-shell](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](mailto:bloggingitguy@gmail.com) napisał:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 9:10pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/4 "2014-10-30T21:10:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alex\_Scoble](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Alex\_Scoble](https://forum.ansible.com/u/Alex_Scoble)\
**Post date:** [October 30, 2014, 9:17pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/5 "2014-10-30T21:17:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alex\_Scoble](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Alex\_Scoble](https://forum.ansible.com/u/Alex_Scoble)\
**Post date:** [October 30, 2014, 9:48pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/6 "2014-10-30T21:48:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alex\_Scoble](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Alex\_Scoble](https://forum.ansible.com/u/Alex_Scoble)\
**Post date:** [October 30, 2014, 10:41pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/7 "2014-10-30T22:41:12Z")

</div>

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

Thanks,

Alex

---

<div class="post-metadata">

**Author:** ![Alex\_Scoble](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Alex\_Scoble](https://forum.ansible.com/u/Alex_Scoble)\
**Post date:** [October 30, 2014, 11:08pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/8 "2014-10-30T23:08:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [November 1, 2014, 2:45pm UTC](https://forum.ansible.com/t/better-output-for-ad-hoc-commands/16647/9 "2014-11-01T14:45:50Z")

</div>

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.
