On Mon, 9 Sep 2019 00:54:32 -0700 (PDT)
Danny Rehelis <auto...@gmail.com> wrote:

> > >  vars: 
> > >    my_hosts: 
> > >      - ['host1', 'host2'] 
> > >      - ['host3'] 
> > > [...] 
> > > loop: "{{ my_hosts }}" 
> > > [...] 
> > > ERROR! Unexpected Exception, this is probably a bug: unhashable type:   

> >
> > Flatten the lists. 
> >
> >       loop: "{{ my_hosts|flatten }}" 
> >

> What i'm trying to achieve is -
>     "msg": {
>         "all": [
>             "host1",
>             "host2",
>             "host3"
>         ],
>         "group0": [
>             "host1",
>             "host2"
>         ],
>         "group1": [
>             "host3"
>         ],
>         "ungrouped": []

You've said "I want this to be dynamic as much as possible". Where does this
"dynamic" assignment of the hosts to the groups come from? Any structure? If
not it might be hard-coded i.e not dynamic at all. Make your choice.

Cheers,

        -vlado

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20190909125237.11c3e648%40gmail.com.

Attachment: pgpyp6PMcisKX.pgp
Description: OpenPGP digital signature

Reply via email to