Unexpected "Item is undefined"

1,884 views
Skip to first unread message

Capi Etheriel

unread,
Dec 10, 2014, 3:41:20 PM12/10/14
to ansible...@googlegroups.com
Hi folks

It's in a role as you can see. I've gisted the only files I edited in it.
The problem is it says item is not defined:

fatal: [localhost] => One or more undefined variables: 'item' is undefined

I'm running with -vvvv but I can't get any better debug output, that is all :(
The thing is, I believe it *should* work. I can't see what's the issue here...

Serge van Ginderachter

unread,
Dec 10, 2014, 3:44:33 PM12/10/14
to ansible...@googlegroups.com
On 10 December 2014 at 21:41, Capi Etheriel <barra...@gmail.com> wrote:

​kast line(13) in the task file, the indent of with_items is wrong:

        with_items: aws_vpc_subnets
 
​Indent should be the same as the name: of the task

It's in a role as you can see. I've gisted the only files I edited in it.
The problem is it says item is not defined:

fatal: [localhost] => One or more undefined variables: 'item' is undefined

I'm running with -vvvv but I can't get any better debug output, that is all :(
The thing is, I believe it *should* work. I can't see what's the issue here...

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dd3ec46e-3a94-4809-b0e8-152d4e7733af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Capi Etheriel

unread,
Dec 11, 2014, 9:19:22 AM12/11/14
to ansible...@googlegroups.com
Thanks. I had misunderstood how with_items were expanded.
I have managed to wrap my head around it, results can be seen here: https://github.com/barraponto/ansible-aws-vpc/blob/master/tasks/main.yml 
Reply all
Reply to author
Forward
0 new messages