Arguments to include, one task created per argument.

Hello,

I am trying to configure networking using ansible (on RHEL 5). Since
this is just text, I thought a template would suffice.

This is what I tried.

In my main playbook:

Now, what happened when I tried to run this was that for each
parameter on the include line, a task was created. That’s not what I
expected. Especially since the examples contain:

  • tasks:
  • include: wordpress.yml user=timmy
  • include: wordpress.yml user=alice
  • include: wordpress.yml user=bob

This is most definitely a bug, good catch!

I suspect is was damaged in some code cleanup over the last week or so, and we didn’t have a test for it.
(Which I need to fix).

I “fixed” that, but I’d like to know if this was indeed the correct approach?

Otherwise I’ll send a pull request for
https://github.com/jhoekx/ansible/compare/include-arguments

Please do, thanks! You may want to rebase against master as there has been a small amount of code reorganization lately.

A second thing I’d like to ask is if would be possible to have
/usr/bin/python in the shebang changed to /usr/bin/env python?
/usr/bin/python is a symlink to python3 on my Arch system. I usually
create a virtualenv for development and env will use python2 if I
create a correct virtualenv.

Absolutely, no problem… send me a pull request if you like.