title: What's the easy way to auto create non existing dir in ansible
body: <p>In my Ansible playbook many times i need to create file there</p>
  
  <pre><code> - name: Copy file
     template:
       src: code.conf.j2
       dest: "{{project_root}}/conf/code.conf"
  </code></pre>
  
  <p>now many times <code>conf</code> dir is not there. Then I have to create more task to create that dir first.</p>
  
  <p>Is there any easy way to auto create dir if don't exist with some option</p>