Thanks Mike! I'll take a go at using this :) On Tuesday, 8 December 2015 15:06:08 UTC, Mike Biancaniello wrote: > > First, in your j2, you can't ever reference `item` without `item.key` or > `item.value`. > > However, I think your amin problem is that your first iteration is a dict > (not a list) and the second is a list of dicts without deterministic keys. > > Try this: > > hubot_bots: > testbot: > owner: 'Bot Wrangler <[email protected]>' > name: Hubot > descr: Delightfully aware robutt > adapter: rocketchat > environment: > - key: rocketchat_room > value: GENERAL > - key: rocketchat_user > value: Hubot > - key: rocketchat_password > value: Hubot > > > > > or: > > hubot_bots: > testbot: > owner: 'Bot Wrangler <[email protected]>' > name: Hubot > descr: Delightfully aware robutt > adapter: rocketchat > environment: > rocketchat_room: GENERAL > rocketchat_user: Hubot > rocketchat_password: Hubot > > > You could also go with with_items and change the vars to: > > hubot_bots: > - label: testbot > owner: 'Bot Wrangler <[email protected]>' > name: Hubot > descr: Delightfully aware robutt > adapter: rocketchat > environment: > rocketchat_room: GENERAL > rocketchat_user: Hubot > rocketchat_password: Hubot > > > > >
-- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/47fe360d-2807-4cec-83f8-e62bbbed86b8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
