how to retain stdout formatting when using adhoc commands (shell module)

28 views
Skip to first unread message

je...@redhat.com

unread,
Aug 17, 2017, 2:32:20 PM8/17/17
to Ansible Project
Hey -- when running adhoc commands (using shell module), the stdout returned from target systems is stripped of formatting.  Is there a standard way to retain the formatting?

Mike Klebolt

unread,
Aug 17, 2017, 3:51:48 PM8/17/17
to Ansible Project
Not sure what exactly you mean.  Is stdout_lines what you're looking for?

Jeremy Eder

unread,
Aug 17, 2017, 3:53:24 PM8/17/17
to Ansible Project
I think so, but wasn't able to get that working with adhoc commands.

Kai Stian Olstad

unread,
Aug 18, 2017, 4:41:57 PM8/18/17
to ansible...@googlegroups.com
What formatting are you missing? I get this:

$ ansible localhost -a "toilet -f letter Ansible"
localhost | SUCCESS | rc=0 >>
A N N SSSS III BBBB L EEEEE
A A NN N S I B B L E
AAAAA N N N SSS I BBBB L EEEE
A A N NN S I B B L E
A A N N SSSS III BBBB LLLLL EEEEE


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages