title: Get parent directory in Ansible?
body: <p>Is there a way to evaluate a relative path in Ansible?</p>
  
  <pre><code>tasks:
    - name: Run docker containers
      include: tasks/dockerup.yml src_code='..'
  </code></pre>
  
  <p>Essentially I am interested in passing the source code path to my task. It happens that the source code is the parent path of <code>{{ansible_inventory}}</code> but there doesn't seem to be anything to accomplish that out of the box.</p>
  
  <p>---- further info ----</p>
  
  <p>Project structure:</p>
  
  <pre><code>myproj
    app
    deploy
      deploy.yml
  </code></pre>
  
  <p>So I am trying to access <code>app</code> from <code>deploy.yml</code>.</p>