On fredag 25. august 2017 00.30.16 CEST John Harmon wrote:
> Side question:  Where can I find a list of debug output types for my vars
> (ie. stdout, stdout_lines, etc)?

Each module return different ting, best is to check documentation or just run

- debug: var=<variable name in register>


> Thanks in advance
> 
> test.yml
> ---
> - hosts: cent
>   gather_facts: no
>   tasks:
>   - name: Gather list of ifcfg-* files
>     find:
>       paths: "/etc/sysconfig/network-scripts"
>     register: net_files
> 
>   - name: DEBUG INFO
>     debug:
>       msg: "{{ net_files.stdout_lines }}"
>       verbosity: 3

If you check the documentation
https://docs.ansible.com/ansible/latest/find_module.html#return-values

you'll see find only return files, examined and matched, not stdout_lines.

So changes it to "{{ net_files.files }}"

You could have check the content of the variable with

- debug: var=net_files


-- 
Kai Stian Olstad

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2017862.WxIriue2tZ%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to