# YAML tags support

**URL:** <https://forum.ansible.com/t/yaml-tags-support/24028>\
**Category:** Ansible Project\
**Created:** [March 21, 2017, 6:04pm UTC](https://forum.ansible.com/t/yaml-tags-support/24028 "2017-03-21T18:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Kashin](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@Michael\_Kashin](https://forum.ansible.com/u/Michael_Kashin)\
**Post date:** [March 21, 2017, 6:04pm UTC](https://forum.ansible.com/t/yaml-tags-support/24028/1 "2017-03-21T18:04:09Z")

</div>

I’m trying to load a host variable YAML file containing a[YAML tag](http://pyyaml.org/wiki/PyYAMLDocumentation#YAMLtagsandPythontypes) !!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:

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 21, 2017, 8:13pm UTC](https://forum.ansible.com/t/yaml-tags-support/24028/2 "2017-03-21T20:13:18Z")

</div>

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.
