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

673 views
Skip to first unread message

Shinta Smith

unread,
May 15, 2015, 12:45:17 PM5/15/15
to ansible...@googlegroups.com
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:

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

which seems related to mine.

Anyone knows any workaround? I can't rename the file easily. 
Reply all
Reply to author
Forward
0 new messages