I'm trying to find a few file patterns from a few windows hosts and copy 
those files to my ansible controller.  Can some help me with the error 
message below.  I can't seem to figure out what I'm doing wrong.



ERROR! Syntax Error while loading YAML.


The error appears to have been in 
'/home/vagrant/ansible/test-win-find.yml': line 14, column 6, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

      flat: yes
     with_items:
     ^ here

---
- hosts: all

  tasks:
  - win_find:
      paths: C:\Temp
      patterns: ['*.log', '*.out', '*.tar', '*.scmd']
    register: files_to_copy

  - fetch:
      src: C:\Temp\{{ item }}
      dest: /home/testuser1/remote-files/
      flat: yes
     with_items:
       - "{{ files_to_copy.stdout_lines }}"


ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 
20120313 (Red Hat 4.4.7-17)]

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/71af4ed5-f336-4415-b500-ae5e716470bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to