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