I know I can easily do:
shell: rm -f /etc/whatever/*
or possibly via a register variable on
shell: ls -1 /etc/whatever/*
register: dircontents
I had assumed I would be able to do this in Ansible trivially without templating, but am not finding it straightforward
- with_glob enumerates “local” files only
- file: doesn’t take wildcards as far as I know
Is there something obvious I’m missing, or are the above the available implementation-patterns for this?