# Variable for root Project path

**URL:** <https://forum.ansible.com/t/variable-for-root-project-path/26768>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 17, 2018, 4:13am UTC](https://forum.ansible.com/t/variable-for-root-project-path/26768 "2018-02-17T04:13:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claudio\_Patricio\_Rif](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@Claudio\_Patricio\_Rif](https://forum.ansible.com/u/Claudio_Patricio_Rif)\
**Post date:** [February 17, 2018, 4:13am UTC](https://forum.ansible.com/t/variable-for-root-project-path/26768/1 "2018-02-17T04:13:50Z")

</div>

HI there.

Not sure if his is a noob question. But is there a variable to get the path of a project?

I’m trying to deploy files included on GIT to several servers (SSL Certificates, configuration files, etc).  
When i add a project (GIT) i know it get deployed inside /var/lib/awx/projects/ but i do not know the name it will get.

My files are located on a folder called “files” at the project root level.

I have found so far that the copy module uses the playbook path as default path.  
I have also found that some variables for paths like:  
playbook\_dir

inventory\_dir (This one did not work for me. For some reason the value was inside the /tmp foldet)

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [February 19, 2018, 12:46pm UTC](https://forum.ansible.com/t/variable-for-root-project-path/26768/2 "2018-02-19T12:46:46Z")

</div>

We don’t put this path in as a variable for job runs. I will say that when your job runs we’ll set the current-working directory to _that_ path, so if you can build a path to the file from the top of the tree then you’ll be in business.

---

<div class="post-metadata">

**Author:** ![Le\_Nghiem\_VO](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@Le\_Nghiem\_VO](https://forum.ansible.com/u/Le_Nghiem_VO)\
**Post date:** [June 19, 2019, 11:49am UTC](https://forum.ansible.com/t/variable-for-root-project-path/26768/3 "2019-06-19T11:49:48Z")

</div>

Hi,

I’m facing with the same problem about inventory\_dir.  
Did you fix the problem ?

---

<div class="post-metadata">

**Author:** ![Angel\_Rengifo\_Cancin](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Angel\_Rengifo\_Cancin](https://forum.ansible.com/u/Angel_Rengifo_Cancin)\
**Post date:** [June 20, 2019, 3:44pm UTC](https://forum.ansible.com/t/variable-for-root-project-path/26768/4 "2019-06-20T15:44:28Z")

</div>

Not sure if I underdtood correctly your needs. Is this code helpful?

- shell: |  
pwd  
delegate\_to: localhost  
register: result

- debug: msg={{ result | basename }}
