On Thu, 23 Jan 2020 16:03:36 -0800 (PST)
Nicholas Yue wrote:
> - debug: msg="{{ item.stdout_lines }}"
> with_items: "{{ out.results }}"
>
> I am unable to print out just the output results in stdout_lines, it
> prints out other information which I'd like to suppress
Use 'loop_control'
Hi,
I have the following ansible script
$ cat generated-head-node.yaml
- hosts: all
tasks:
- name: Run multiple commands
command: "{{item}}"
with_items:
- pwd
- ls
register: out
- debug: msg="{{ item.stdout_lines }}"
with_items: "{{ out.results }}"
I am