Hi,

I'm looping over a set of repositories and storing them using 'register', 
for each of these repositories I'm listing the configuration directory and 
storing the results using register, so far so good.
Now I'm trying to compare the results against a list of configuration files 
that should exist within that repository, but I can't seem to get that done.

What I'm trying to do:

- name: check repos
  shell: ls -1 {{ path }}/{{ item.name }}/{{ config_dir }}
  register: found
  with_items: repositories

found, at this point contains 'x' repositories with 'y' files, 
y.stdout_lines contains the files that were found for 'x'.

The "cleanup" code I'm trying to write does something like:

- name: remove unmanaged
  file:
    path: ...
    state: absent
  with_together:
    - repositories
    - found.results
    - item.1.stdout_lines <--- these would be the actual file names
  when: item.2 not in configuration_files

Sadly, this doesn't seem to work.. how is one supposed to deal with this?

Thanks,
Nico

-- 
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/f2b60191-eec6-45cc-9860-b4db04a41d84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to