title: Using wildcards in ansible playbooks
body: <p>I'm running a script remotely on an ansible client which creates a filename HOSTNAME.html.
  I plan to run this on numerous clients in one go, so I need to be able to copy all the files *.html from all the clients.
  I'm new to this so have a little playbook.</p>
  
  <pre><code>---
  - hosts: tariq-test
    tasks:
  
    - name: run script
  
      script: /usr/bin/cfg2html-linux
  
    - name: fetch file
  
      fetch:
        src: /root/*.html
        dest: /tmp/
        flat: yes
  </code></pre>
  
  <p>And get this:</p>
  
  <pre><code>[root@ansible playbooks]# ansible-playbook scp.yml
  
  PLAY [tariq-test] *******************************************************************************************************************************************
  
  TASK [Gathering Facts] **************************************************************************************************************************************
  ok: [tariq-test]
  
  TASK [run script] *******************************************************************************************************************************************
  changed: [tariq-test]
  
  TASK [fetch file] *******************************************************************************************************************************************
  fatal: [tariq-test]: FAILED! =&gt; {"changed": false, "msg": "file not found: /root/*.html"}
          to retry, use: --limit @/etc/ansible/playbooks/scp.retry
  
  PLAY RECAP **************************************************************************************************************************************************
  tariq-test                 : ok=2    changed=1    unreachable=0    failed=1
  </code></pre>