title: How to use wild card while giving file permission using Ansible?
body: <p>there. I am new to ansible. I was trying to give some permission to multiple file using ansible. I aleardy tried follwoing code:  </p>
  
  <pre><code>- hosts: all
    tasks:
      - name: Giving file permission to tomcat/bin sh file
        file: path=/tomcat/apache-tomcat-8.5.23/bin/*.sh owner=tomcat group=tomcat mode=755
  </code></pre>
  
  <p>in the above code i want to give permission to tomcat for  all .sh file located in tomcat/bin directory.I have already created a tomcat user. When i run this playbook i get this error:</p>
  
  <pre><code> {"changed": false, "msg": "file (/tomcat/apache-tomcat-8.5.23/bin/*.sh) is absent, cannot continue", "path": "tomcat/apache-tomcat-8.5.23/bin/*.sh", "state": "absent"}
  </code></pre>
  
  <p>How can i do that?</p>