# Ansible template error: "TypeError: unsupported operand type(s) for -: 'StrictUndefined' and 'StrictUndefined'"

**URL:** <https://forum.ansible.com/t/ansible-template-error-typeerror-unsupported-operand-type-s-for-strictundefined-and-strictundefined/18238>\
**Category:** Ansible Project\
**Created:** [May 15, 2015, 4:02pm UTC](https://forum.ansible.com/t/ansible-template-error-typeerror-unsupported-operand-type-s-for-strictundefined-and-strictundefined/18238 "2015-05-15T16:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shinta\_Smith](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@Shinta\_Smith](https://forum.ansible.com/u/Shinta_Smith)\
**Post date:** [May 15, 2015, 4:02pm UTC](https://forum.ansible.com/t/ansible-template-error-typeerror-unsupported-operand-type-s-for-strictundefined-and-strictundefined/18238/1 "2015-05-15T16:02:22Z")

</div>

Hello,  
I have a task like this:

> - name: my configuration files  
> template: src={{ item }} dest=/etc/myapp/{{ item }} owner=myuser group=myuser mode=0644  
> tags: config  
> with\_items:
> - hive-site.xml
> - my-app.properties

When I ran the playbook, I got an error:

> ```auto
> TASK: [my configuration files] ********************************************** 
> fatal: [192.168.1.1] => {'msg': "TypeError: unsupported operand type(s) for -: 'StrictUndefined' and 'StrictUndefined'", 'failed': True}
> fatal: [192.168.1.1] => {'msg': 'One or more items failed.', 'failed': True, 'changed': False, 'results': [{'msg': "TypeError: unsupported operand type(s) for -: 'StrictUndefined' and 'StrictUndefined'", 'failed': True}]}
> 
> ```

I read this open issue:  
[https://github.com/ansible/ansible/issues/9773](https://github.com/ansible/ansible/issues/9773)

which seems related to mine.

Anyone knows any workaround? I can’t rename the file easily.
