The right answer to this probably depends on where this "input file" is located (on Ansible server or on hosts being modified) and what you're wanting to do with the information. But in general, if you are talking about reading a YAML or JSON file into variables for use within a playbook you can take a look at include_vars. Hosts can also provide local JSON or INI information via *.fact files in /etc/ansible/facts.d. Or you can read YAML information specific to hosts, groups, etc via all the variable directory conventions (group_vars, host_vars, etc)
If you can give some further details, someone may have a better plan. On Wednesday, July 20, 2016 at 8:53:18 AM UTC-6, K Dawg wrote: > > Is there a way ansible can use an input file like xml / yaml / json to > control its actions? > > I know "lookup" works on "flat" file types, but I cannot find reference to > a feature that can walk a tree-like hierarchical input file type (e.g., xml > / yaml / json ). > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9e0a6885-8c16-4b76-bb27-eede82b5edc5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
