I’m trying to load a host variable YAML file containing a YAML tag !!set. This set data structure is required by one of my custom Ansible modules. When it is loaded into Ansible runtime, the data structure inside the host variable file is stored as a string and not dictionary, hence none of the variables are accessible and inside my custom module I have to do eval
to get the python dictionary. Is this the expected behaviour and is there a plan to have the full support of all standard YAML tags?
Here’s example of my host variable file:
Not sure what you mean by supported, they are already by using the
pyyaml library. A set is not a dict, and from what you show, you get
what i would expect. 'data' is a dict, myset is a 'set', which is
incompatible with with_dict.