Hello All,
I'm ultimately attempting to pull a list of files with wildcarded paths and pass the results into the replace module so it can cycle through them all. However, starting with a more simple example, i'm having issues getting the list of files to print properly in even a simple test case.
Pastebin code:
I'm looking for this:
test.yml playbook
- hosts: all
tasks:
- name: gather list of files
shell: ls {{ item }}
register: files
with_items:
- /app/psoft/test/*/list.txt
- /app/psoft/test/*/context.xml
- name: use shell to print list of file paths
shell: "echo {{ item }}"
with_items: "{{files.stdout_lines}}"
to print
However currently the result is:
TASK [gather list of files] ****************************************************
changed: [net12204] => (item=/app/psoft/test/*/list.txt)
changed: [net12204] => (item=/app/psoft/test/*/context.xml)
TASK [use shell to print list of file paths] ***********************************
[DEPRECATION WARNING]: Skipping task due to undefined attribute, in the future this will be a fatal error.. This feature will
be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Thanks!
Jason