title: Use Gitlab CI/CD variables in YAML file
body: <p>I have got a YAML configuration file in which I need to store an API key. As I do not want to commit my API Key to my Repo I figured a Gitlab CI/CD variable would be a good option. I have configured the variable in the Gitlab UI to be:</p>
  <p><code>TOKEN = &quot;123&quot;</code></p>
  <p>My <code>.gitlab.ci.yml</code> file contains:</p>
  <pre><code>image:
    name: xxx
  variables:
    P_TOKEN: ${TOKEN}
  </code></pre>
  <p>And my YAML file has:</p>
  <pre><code>spec:
    command: test.sh
    env_vars:
    - TOKEN=${P_TOKEN}
  </code></pre>
  <p>But it just sets <code>TOKEN</code> in the YAML file to <code>${P_TOKEN}</code> instead of the contents of <code>${P_TOKEN}</code>. If I echo out my variables in my CI/CD pipeline it is set correctly.</p>