On Monday, 5 March 2018 12.15.02 CET rasha hajlaoui wrote:
> I've got a problem with ansible playbook. In fact, I use debug module to
> display a file content.
>
>
> *the content of myfile is : *
>
>
> <network ip="1.2.3.[0-255]" />
>
>
> *my playbook.yml is as follow: *
>
>
> - name: Display file content
> shell: cat myfile
> register: file
>
> - debug:
> msg: "{{file.stdout_lines}}"
You are printing out stdout_lines which is a list, you need to use {{ file.stdout }} instead.
--
Kai Stian Olstad