ansible-bundler icon indicating copy to clipboard operation
ansible-bundler copied to clipboard

"Unexpected Exception" while using digits for name tasks in role

Open ingvarrwvw opened this issue 4 years ago • 4 comments
trafficstars

Hi. How to repeat:

  1. Create role with ansible-galaxy
  2. Create any task
  3. Include task in tasks/main.yml like this:
  • name: 1 include_tasks: tasks/any_task.yml

Create bundle and run it on target host:

PLAY [localhost] ***************************************************************************************************************************************** ERROR! Unexpected Exception, this is probably a bug: argument of type 'int' is not iterable

ingvarrwvw avatar Sep 02 '21 05:09 ingvarrwvw

This has nothing to do specifically to ansible-bundler, but to ansible itself.

In yaml, you can force a number to be a string by wrapping it in quotes, have you tried it?

- name: "1"

kriansa avatar Sep 02 '21 16:09 kriansa

This is the problem of the bundler, because the ansible works out this playbook without errors

ingvarrwvw avatar Sep 03 '21 04:09 ingvarrwvw

If that's the case I'll reopen it so I can test this later. Have you tried the workaround I mentioned?

kriansa avatar Sep 03 '21 04:09 kriansa

When using string, it solve problem

ingvarrwvw avatar Sep 07 '21 17:09 ingvarrwvw

I'm closing this again since it's not an ansible-bundler issue.

kriansa avatar Apr 29 '23 18:04 kriansa