On Friday, 1 December 2017 22.04.46 CET [email protected] wrote: > I have a dictionary of DNS host names that I need to register. > > They're higher level than just a host as I need to do cleanup too of older > DNS names. > > My idea was to have a block with a look which first tests via 'dig' to see > if the name is already present, and if not, register the DNS via the > dnsimple module > > The problem is that blocks don't support with_items. > > At least in 2.2 and I don't see a note about this being added. > > Is it in 2.4? I don't see any notes about this.
What is supported is here https://docs.ansible.com/ansible/latest/playbooks_keywords.html#block And with_items is not one of them. You don't need block, you can do this in one task. Just dnssimple with with_item and use the dig lookup[1] in the when: [1] https://docs.ansible.com/ansible/latest/playbooks_lookups.html#the-dns-lookup-dig -- Kai Stian Olstad -- 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/13039992.s0CDJN3rSo%40x1. For more options, visit https://groups.google.com/d/optout.
