Add zuul.executor.work_root to inventory

It is helpful to expose the work_root into the inventory. Today, we
would need to use a relative path on log_root or src_root. Having the
absolute path is better to read for debugging.

Change-Id: I86ff459d283eaf348821c2f11c1f8575598f088d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/doc/source/user/jobs.rst b/doc/source/user/jobs.rst
index b6a8564..f533f54 100644
--- a/doc/source/user/jobs.rst
+++ b/doc/source/user/jobs.rst
@@ -322,6 +322,8 @@
 **zuul.executor.log_root**
   The path to the logs directory.
 
+**zuul.executor.work_root**
+  The path to the working directory.
 
 .. _user_sitewide_variables:
 
diff --git a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
index 3f62c4c..cd343d0 100644
--- a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
+++ b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
@@ -13,6 +13,7 @@
           - zuul.executor.hostname is defined
           - zuul.executor.src_root is defined
           - zuul.executor.log_root is defined
+          - zuul.executor.work_root is defined
 
     - name: Assert zuul.project variables are valid.
       assert:
@@ -29,4 +30,4 @@
         that:
           - vartest_job == 'vartest_job'
           - vartest_secret.value == 'vartest_secret'
-          - vartest_site == 'vartest_site'
\ No newline at end of file
+          - vartest_site == 'vartest_site'
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 22ca59f..b166111 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -1350,6 +1350,7 @@
             hostname=self.executor_server.hostname,
             src_root=self.jobdir.src_root,
             log_root=self.jobdir.log_root,
+            work_root=self.jobdir.work_root,
             result_data_file=self.jobdir.result_data_file)
 
         nodes = self.getHostList(args)