How to fetch a file from remote server without creating additional subfolders

This works except it creates additional subdirectories within the destination. I just want to copy into my current working directory where I’m running ansible from.

ansible all -m fetch -a “src=/tmp/pci.{{ inventory_hostname }}.txt dest=pci-{{ inventory_hostname }}.txt”

There is the “flat” option: http://docs.ansible.com/fetch_module.html

  • James

I meant to reply to my original thread and say flat didn’t change anything.

Please file a bug report on github.com for this issue.