Hi all, I have the following problem. Given: SVN repo with some complex YAML configuration files Aim: fetch a file from SVN and register file's content as Ansible fact (dict object) Problem: fetched file is not converted into dict object, but considered by ansible be a unicode string
Example, (I will skip svn checkout step) ====== YAML ======= fruits: banana: weight: 10 unit: kg fans: [ Adam, John ] cherry: weight: 20 unit: lb fans: [ Justine, Mary ] ================== ====== Ansible steps ======== - name: read content shell: echo /tmp/example.yml register: new_var - name: set ansible fact set_fact: c = {{ new_var }} - name: testing debug: msg="I'd like to eat {{ c.cherry.weight }} {{ c.cherry.unit }} of cherries" ======================== Thanks in advance! Regards, Anton Kozik -- 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 post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1a3127c9-940e-4b0b-88ac-c04a9d3aadf7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.