TypeError when using include

Hi,

I’m newbie to ansible, and I have a problem when using include feature. I had a search in google and in mailinglist but cant find anything useful.
This is my playbook.yml file:


  • hosts: mailservice
    vars:
    userdir: /data2/mailservice
    user: root
    tasks:
  • include: tasks/python-mail.yml
  • name: ensure mailservice directory exists
    action: file path={{ userdir }} state=directory

And this is the content of file tasks/python-mail.yml:


  • name: install python
    action: yum pkg=python state=installed

When I run the ansible-playbook command, it raise the error

Traceback (most recent call last):
File “/usr/bin/ansible-playbook”, line 100, in
sys.exit(main(sys.argv[1:]))
File “/usr/bin/ansible-playbook”, line 77, in main
sudo_pass=sudopass
File “/usr/lib/python2.7/site-packages/ansible/playbook.py”, line 104, in init
self.playbook = self._parse_playbook(playbook)
File “/usr/lib/python2.7/site-packages/ansible/playbook.py”, line 192, in _parse_playbook
self._include_tasks(play, task, dirname, new_tasks)
File “/usr/lib/python2.7/site-packages/ansible/playbook.py”, line 157, in _include_tasks
included = utils.template_from_file(path, inject_vars)
File “/usr/lib/python2.7/site-packages/ansible/utils.py”, line 255, in template_from_file
return template(data, vars)
TypeError: template() takes exactly 3 arguments (2 given)

It run ok if I comment out the include line. I’m using ansible version 0.3 on Fedora 16. Can you tell me what’s wrong with my config, or is it a bug? Thank you very much.

Regards,

Pull the latest code on the master branch and this problem goes away.