title: Trying to pass a variable from jenkins to ansible playbook
body: <p>I have setup a webhook from gitlab to kick off a jenkins job based on a tag push event.  Could be a merge or commit, but the devs want to use a tag.  No prob, it works fine.  This job gets the hash of the tagged commit, and I've verified that also works.  This job then kicks off another job which  runs an ansible playbook, and starts a build.  </p>
  
  <p>So I am trying to pass the git commit hash as an ansible extra_var and I write the hash out to a file in the build step via execute shell command. I am using  post Build Action to trigger the downstream job, and I am using the parameter from this property file.</p>
  
  <p>The console output verifies this, I see the commit hash echoed out.
  the properties file contains:</p>
  
  <pre><code>GIT_KEY=3432134325e4323423    (fake sample hash provided)
  </code></pre>
  
  <p>The issue is in the downstream job, when I try and pass the GIT_KEY as an extra var so the ansible playbook will fetch the right git commit.  I get the following error:  </p>
  
  <pre><code>/usr/bin/git checkout --force ${GIT_KEY}", "failed": true, "msg": "Failed to checkout ${GIT_KEY}"
  </code></pre>
  
  <p>I've tested this statically setting the extra vars value, and it works, so I know the playbook works.  Its just not interpolating this variable that I'm passing to it correctly, or as I would expect.</p>
  
  <p>Does anyone know how to pass a jenkins paramter as an extra_var to ansible?</p>