On Wed, 12 May 2021 at 21:44, Jeremy Smith <[email protected]> wrote:
>
> I've read the documentation at the link you provided and am unsure how any of
> that can help me. There is no other list than FilesOver30.files to compare it
> with.
>> >> - name: Delete all files/folders older than 30 days from diagnostics
>> >> folder
>> >> win_file:
>> >> path: "{{ unc_path }}"
>> >> state: absent
>> >> with_items: "{{ FilesOver30.files }}"
If I understand your problem description correctly, the value of
"unc_path" is in the FIlesOver30.files list.
You can remove it by the difference of a list containing a single
item: the unc_path.
with_items: "{{ FilesOver30.files | difference([unc_path]) }}"
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNs8UaPVXP9e8Sff1%3DPs90qm_weNSeF08dwX38V-3saJQ%40mail.gmail.com.