title: how to remove all /etc/*.txt files with puppet
body: <p>this puppet manifest will remove the file <code>/etc/file.txt</code> if it exists:</p>
  
  <pre><code>  file { "/etc/file.txt":
      ensure  =&gt; absent,
    }
  </code></pre>
  
  <p>how to tell puppet to remove all files <code>/etc/*.txt</code>?</p>
  
  <p>according to the reference, it seems that <code>puppet file</code> does not allow wildcards.
  <a href="https://puppet.com/docs/puppet/latest/types/file.html" rel="nofollow noreferrer">https://puppet.com/docs/puppet/latest/types/file.html</a></p>
  
  <p>ps: I am aware that I could execute a script from puppet, but I would prefer another more elegant way.</p>