Yaml is easily converted to some sort of structure, you are mostly dealing 
with dicts or lists, so in your case you can set complex_args to;

$complex_args = @{
    add_children = @(
            name = "Ansible Brew"
            type = "light"

As you can see we are setting the key add_children which is a list of 
dictionary values. In Python a list is expressed in the form of *@("entry", 
"another_entry")* while dictionaries are expressed in the form or *@{key = 
"value"; key2 = "value2"}*. You can mix and match all these but once you 
understand how to convert Ansible to lists and dicts you should be good.

Depending on your version of the Legacy module_utils, Get-AnsibleParams 
just tries to convert the input source to the one that is expected, for a 
list, it will convert a string by splitting it by , but for existing lists 
it should just return that value as is.



You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to