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:
http://pastebin.com/zFRzucat

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

/app/psoft/test/12.1.2.00/list.txt
/app/psoft/test/12.1.3.00/context.xml

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.


Am I misusing or not 
understanding 
http://docs.ansible.com/ansible/playbooks_loops.html#iterating-over-the-results-of-a-program-execution
 
properly?


Thanks!
Jason

-- 
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/0f1149dc-5e65-42f6-95b3-af0fc981f88f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to