title: How can I use a wildcard to include multiple files for using environment variables in Ansible?
body: <p>I am trying to do a custom install of <a href="https://github.com/edx/configuration" rel="nofollow noreferrer">openedx</a> and I have a bunch of <code>.yml</code> files with environment variables in them inside paths that looks like this </p>
  
  <pre><code>playbooks/roles/&lt;component-name&gt;/defaults/main.yml
  </code></pre>
  
  <p>Then, while running a playbook that installs all such components, I'm using a command like this</p>
  
  <pre><code>ansible-playbook ./openedx_native.yml -e"@roles/&lt;component-name-1&gt;/defaults/main.yml" -e"@roles/&lt;component-name-2&gt;/defaults/main.yml"
  </code></pre>
  
  <p>Now I want to be able to use the main.yml files from all components and there are about 20-25 of them, so I'm looking for a way to include them using a wildcard, something like this</p>
  
  <pre><code>ansible-playbook ./openedx_native.yml -e"@roles/*/defaults/main.yml"
  </code></pre>
  
  <p>This, of course, doesn't work and Ansible throws an error like this</p>
  
  <blockquote>
    <p>ERROR! the file_name
    '/var/tmp/configuration/playbooks/roles/*/defaults/main.yml' does not
    exist, or is not readable</p>
  </blockquote>
  
  <p>How do I achieve this? Please help!</p>