On Tue, 14 Jun 2022 12:17:53 -0700 (PDT) "[email protected]" <[email protected]> wrote:
> Thank you, Vladimir.
> It works. Is there any trick to make this with one-liner?
Sure. The one-liner below does the job as well. You're welcome
_dict: "{{ dict(_list|groupby('group')|map('first')|list|
zip(_list|groupby('group')|map('last')|
map('map',
attribute='name')|list))
}}"
--
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/20220614222511.3222ae22%40gmail.com.
pgp0FKsxFRqYZ.pgp
Description: OpenPGP digital signature
