Q:

Ansible - Does copy support shell * expansion

Ansible 1.9.2 / newer.
Playbook:
# Push Performance tests artifact zip file on remote jmeter machine
- name: Push Performance tests artifact zip file on remote jmeter machine
  copy: src="performance-tests-*.zip"  dest={{ common_download_dir }} 

It errors out:
19:32:08 TASK: [perf_tests | Push Performance tests artifact zip file on remote jmeter machine] *** 
19:32:08 fatal: [jmeter01.server.in.vcloud] => input file not found at /home/service/workspace/run-project-performance-tests/build/artifacts/roles/perf_tests/files/performance-tests-*.zip or /home/service/workspace/run-project-performance-tests/build/artifacts/performance-tests-*.zip
19:32:08 
19:32:08 FATAL: all hosts have already failed -- aborting

I checked on the source machine (where I'm running ansible), the workspace have valid file: performance-tests-0.0.8-20151001.232123-11.zip  
Doesn't ansible support shell expansion i.e. * in src= parameter (into all files) during it's copying operation like copy: src="somePath/*.zip" dest="somePathOnRemoteMachine"?
All of the examples on Ansible site: https://docs.ansible.com/ansible/copy_module.html shows.. only one file for src=... parameter.
PS: I'm not using the validate paramter in copy module.

A:

You can use http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-fileglobs with_fileglob matches all files in a single directory, non-recursively, that match a pattern. It can be used like this::
# copy each file over that matches the given pattern
- copy: src={{ item }} dest=/etc/fooapp/ owner=root mode=600
  with_fileglob:
    - /playbooks/files/fooapp/*

