Variable for root Project path

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)

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.

Hi,

I’m facing with the same problem about inventory_dir.
Did you fix the problem ?

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

  • shell: |
    pwd
    delegate_to: localhost
    register: result

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