Perfect. Thank you.
On Friday, August 25, 2017 at 9:18:14 AM UTC-6, Kai Stian Olstad wrote:
>
> On fredag 25. august 2017 17.03.21 CEST John Harmon wrote:
> > I have the following output from my debug (using "find", and the debug
> > output for "files")
> > {
> > "atime": 1503588437.3974097,
> > "ctime": 1503588433.7234097,
> > "dev": 2051,
> > "gid": 0,
> > "inode": 21408,
> > "isblk": false,
> > "ischr": false,
> > "isdir": false,
> > "isfifo": false,
> > "isgid": false,
> > "islnk": false,
> > "isreg": true,
> > "issock": false,
> > "isuid": false,
> > "mode": "0644",
> > "mtime": 1503588433.7194097,
> > "nlink": 1,
> > "path": "/etc/sysconfig/network-scripts/ifcfg-enp0s3",
> > "rgrp": true,
> > "roth": true,
> > "rusr": true,
> > "size": 278,
> > "uid": 0,
> > "wgrp": false,
> > "woth": false,
> > "wusr": true,
> > "xgrp": false,
> > "xoth": false,
> > "xusr": false
> > }
> >
> > I need to parse out /etc/sysconfig/network-scripts/ifcfg-enp0s3 (or
> maybe
> > even just ifcfg-enp0s3) from the above output.... how would I go about
> > doing that?
>
> I think you have left out something of the output since find can return
> more
> than one answer it always return a list.
>
> So if you use register: result on the find you can always do this.
>
> - debug: msg='Found file: {{ item.path }}'
> with_items: '{{ result.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/2910e2c6-431e-461a-8c17-8b0e52781995%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.