Thank you, Vladimir. I've completely forgotten that ansible allows vars to be defined for a single task.
On Fri, Sep 30, 2022 at 12:18 AM Vladimir Botka <[email protected]> wrote: > The next option is putting the iteration into one task. For example, > > - set_fact: > soarecords_dict: "{{ soarecords_dict|d({})| > combine({item: _dict}) }}" > loop: "{{ zones }}" > vars: > _dict: "{{ dict(soafields| > zip(lookup('dig', item, 'qtype=SOA')|split)) }}" > > > -- > Vladimir Botka > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAMB-ck6N10vx5%2BNhyV7X_y1nbwwrdXEyZfNfXhuXe1aLHw9Ljg%40mail.gmail.com.
