there is also a from_json filter, sometimes it is hard to see what is
json in a var as the output is normally 'jsonized'.

On Thu, Nov 20, 2014 at 11:01 AM, Dmitry Makovey <[email protected]> wrote:
> So I have modified my playbook (see
> https://gist.github.com/droopy4096/98864a10359f5cf27bab ), then played with
> "|list" but the results of it were that all of sudden it grabs JSON string
> and walks through that string one char at a time, resulting in:
>
> changed: [undefined.host.com] => (item=[) => {"changed": true, "groups":
> {"[_group": ["undefined.host.com", "defined.host.com"]}, "item": "["}
> fatal: [undefined.host.com] => error parsing argument string 'key="_group',
> try quoting the entire line.
>
> If you look carefully at the gist - when I do the same "loop" "with_items"
> using "debug:" - everything works as expected, with "group_by" it gets
> screwed up in a major fashion.
>
> I can invert the question and ask: given the existing dynamic inventory
> script, which can add some more "facts" per-host - I'd like to [re]create
> groups based on some of those "facts". What is the best approach?
>
> --
> 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/9c08e835-2be1-4f45-b25a-5f2992ec7f54%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian Coca

-- 
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/CAJ5XC8nzxwCVPA%3D%2B-xAofSELE6j%3DL4RhSFpzK8RVb%2BQFju_K5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to