ansible - fail when the result.stdout has more than 1 row

Viewed 390

I would like to fail when the result.stdout has more than 1 lines / row

tasks:
  - shell: command
    register: result
    
  - fail:
    when: result.stdout has more than 1 lies / row

result.stdout looks like this

0:1:0
0:1:1
0:1:2
0:1:3
0:1:4
0:1:5
1 Answers
Related