On Mon, 17 Mar 2014, Ben Turner wrote:
Looks like all "user-data" in AWS is just a "string" at the end of the day.
So there is no way for Ansible to parse that string and pull out values,
without a third-party module such as
https://github.com/jpmens/ansible-ec2-userdata say ?
It would be a very simple improvement to set_fact to allow a string to
become a json-object, however the syntax of set_fact was made so that
every parameter is a fact name.
However a set_fact_from_json module would be super-easy to implement, so
that you can combine it with uri (or other registered variables).
Another option is to extend the uri module with an option like:
content_as_json=yes
My prefered solution is to include this in the inventory step (outside of
Ansible) so that it can be processed asynchronous (and cached) to Ansible.
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, cont...@dagit.net, http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
--
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/alpine.LRH.2.02.1403171242390.6649%40pikachu.3ti.be.
For more options, visit https://groups.google.com/d/optout.