# Getting template error while templating string: unexpected char while running a playbook with a role

**URL:** <https://forum.ansible.com/t/getting-template-error-while-templating-string-unexpected-char-while-running-a-playbook-with-a-role/22767>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [October 11, 2016, 7:24am UTC](https://forum.ansible.com/t/getting-template-error-while-templating-string-unexpected-char-while-running-a-playbook-with-a-role/22767 "2016-10-11T07:24:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorg\_Kastning](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@Jorg\_Kastning](https://forum.ansible.com/u/Jorg_Kastning)\
**Post date:** [October 11, 2016, 7:24am UTC](https://forum.ansible.com/t/getting-template-error-while-templating-string-unexpected-char-while-running-a-playbook-with-a-role/22767/1 "2016-10-11T07:24:27Z")

</div>

Good morning,

I’m getting the following Error when running my playbook:

`TASK [patch_rhel : Install Red Hat Security Advisory (RHSA)] ******************* fatal: [rhel-t0.hrz.uni-bielefeld.de]: FAILED! => {"failed": true, "msg": "{{ 2016_1_Set }}: template error while templating string: unexpected char u'_' at 7. String: {{ 2016_1_Set }}"}`

I would be very happy if someone could help me to figure out what I’m doing wrong here.

Here are some information about my environment:

`[2016.10.11 09:06:25] /data/ansible root@ansible-pctrl01>cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo) [2016.10.11 09:07:57] /data/ansible root@ansible-pctrl01>uname -r 3.10.0-327.36.1.el7.x86_64 [2016.10.11 09:08:03] /data/ansible root@ansible-pctrl01>ansible --version ansible 2.1.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides`

The playbook I’m trying to run:

`  
root@ansible-pctrl01\>cat patch\_rhel.yml

---

<div class="post-metadata">

**Author:** ![Jorg\_Kastning](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@Jorg\_Kastning](https://forum.ansible.com/u/Jorg_Kastning)\
**Post date:** [October 12, 2016, 2:37pm UTC](https://forum.ansible.com/t/getting-template-error-while-templating-string-unexpected-char-while-running-a-playbook-with-a-role/22767/2 "2016-10-12T14:37:23Z")

</div>

Oh Boy, I’m such a fool. Variable names must not begin with a digit. Instead they need to begin with a character.

After this mistake was fixed my playbook runs as expected.

Mit freundlichen Grüßen

Jörg Kastning
