Perfect.  Thank you.  That was the information I needed.  I saw the return 
values earlier in the documentation, but I assumed I didn't understand it.  
Thx for the debug info too, that will help me in the future.

On Thursday, August 24, 2017 at 4:43:09 PM UTC-6, John Harmon wrote:
>
> Although my current playbook doesn't look for ifcfg files directly, I am 
> just trying to grab a list of files and it is failing.  I can't, for the 
> life of me, figure out why.  If I change the find: to a command: and then 
> run an ls, it works......  wondering if someone can put me on the right 
> path.  Not making any real progress on my own.....
>
> Ultimately I am trying to find files starting with ifcfg- in the specified 
> directory.
>
> Side question:  Where can I find a list of debug output types for my vars 
> (ie. stdout, stdout_lines, etc)?
>
> Thanks in advance
>
> Playbook:
> ---
> - 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
>
>
>
> Output:
> # ansible-playbook test.yml
>
> PLAY [cent] 
> ******************************************************************************************************************************************************************************************************************************
>
> TASK [Gather list of ifcfg-* files] 
> ******************************************************************************************************************************************************************************************************
> ok: [cent7]
>
> TASK [DEBUG INFO] 
> ************************************************************************************************************************************************************************************************************************
> fatal: [cent7]: FAILED! => {"failed": true, "msg": "the field 'args' has 
> an invalid value, which appears to include a variable that is undefined. 
> The error was: 'dict object' has no attribute 'stdout_lines'\n\nThe error 
> appears to have been in '/etc/ansible/playbooks/dns/test.yml': line 10, 
> column 5, but may\nbe elsewhere in the file depending on the exact syntax 
> problem.\n\nThe offending line appears to be:\n\n\n  - name: DEBUG INFO\n   
>  ^ here\n"}
>
> PLAY RECAP 
> *******************************************************************************************************************************************************************************************************************************
> cent7                      : ok=1    changed=0    unreachable=0    failed=
> 1
>
>
>
>
>

-- 
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/e7849f0e-ce87-4db8-bf9a-d7b6dcc6c33f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to