title: ansible local file path for unarchive
body: <p>I have what I think is a fairly common task of taking a local archive file, transferring it to a server, and extracting it there. I'm using the <code>unarchive</code> module for this but struggling with an elegant way to deal with the local filename always being different because the filename includes the software version. For example, here's a excerpt from a playbook:</p>
  
  <pre><code>- name: Upload code
    unarchive: src={{payload_file}} dest={{install_dir}}
  </code></pre>
  
  <p>I can run this and use <code>-e</code> to set the variable:</p>
  
  <pre><code>ansible-playbook -e payload_file=/tmp/payload-4.2.1.zip -i production deploy.yml
  </code></pre>
  
  <p>My question is <strong>is this the best way to handle this situation</strong>? All the docs have hardcoded example file names and paths and I haven't seen any evidence in the docs that makes a variable that will be different each deployment straightforward to set.</p>