debug module stdout print only 8 lines

18 views
Skip to first unread message

Veera

unread,
May 27, 2019, 4:28:37 PM5/27/19
to Ansible Project
Hi,
 
 I am trying to output of an ansible playbook , which  is an output of a custom service status.



 
register: webstat
   
- debug:
       
var: webstat.stdout_lines
        verbosity
: 0


and the output is  as  follows...

ok: [server1] => {
   
"webstat.stdout_lines": [
       
"",
       
"Web Service running...",
       
"",
       
"",
       
"Web  Agent running...",
       
"",
       
"",
       
"Web db Agent running..."
   
]
}

but the  adhoc  command,  the   actual   output is  5 lines


For  any  standard "var.stdout"  only  8 lines are printing .  Any way to  increase the  std.output  lines  above  8 lines 

Kai Stian Olstad

unread,
May 27, 2019, 5:29:46 PM5/27/19
to ansible...@googlegroups.com
On 27.05.2019 22:28, Veera wrote:
> For any standard "var.stdout" only 8 lines are printing . Any way
> to
> increase the std.output lines above 8 lines

Can't confirm this behavior with Ansible 2.8.0

test.yml
---
- hosts: localhost
gather_facts: no
become: no
tasks:
- shell: for i in `seq 1 10`; do echo $i; done
register: result
- debug: var=result.stdout_lines

$ ansible-playbook test.yml

PLAY [localhost] ********************

TASK [shell] ************************
changed: [localhost]

TASK [debug] ************************
ok: [localhost] => {
"result.stdout_lines": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"
]
}


--
Kai Stian Olstad

Veera

unread,
May 28, 2019, 11:30:23 AM5/28/19
to Ansible Project
Thanks .
I am able to print  20  lines  in stdout .. 
Sorry it is a miss from my side and I learned a debug option today . 
Reply all
Reply to author
Forward
0 new messages