title: twig testing global value in template
body: <p>In my symfony project, I have a config variable in my parameters.yml</p>
  
  <pre><code>role : front1
  </code></pre>
  
  <p>In my config.yml, my config variable is exposed</p>
  
  <pre><code>twig:
     globals:     
        role : %role%
  </code></pre>
  
  <p>In my template.html.twig, when i try to test it with an if, I have an error.</p>
  
  <pre><code>{% if {{role}} == 'front2' %}
      {# front2 #}
      (2)
  {% else %}
      {# front1 #}
      (1)
  {% endif %}
  </code></pre>
  
  <p>The error:<br>
  A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "punctuation" of value "{" in ::base.html.twig at line 132 </p>
  
  <p>I don't understand where is the mistake. 
  Can you help me ?</p>
  
  <p>Thanks in advance.</p>