On Wednesday, July 20, 2016 at 2:24:16 PM UTC-4, James wrote:
>
> 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.
>

Thanks for response.
I mean, I want to configure something based on an xml file, but the number 
of various sections is not known before handle. And the existence or 
non-existence of various sections (i.e., XML nodes) is also not known 
before hand.  Same with attributes.

I think i need to suck into an XML Dom and then trigger actions while 
walking the DOM.

 

>
> 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/2d60f4ce-63df-4aea-a0b9-e4cc223c5f78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to