Dick - it is do-able. I have done this for the app servers in my current contract. I would have done it where you are now had there been sufficient interest, time or investment.
Firstly, start off with a set xml file for each type of application (messy but necessary) Secondly, identify differences and use jinja2 to have blocks to manage those unique bits of the jb config so that you can eventually have 1 master xml file and then sub-xml (child) templates purely for the unique blocks. However, you have to be very strict on future changes made to the domain.xml file via the cli or manual xml changes by admins. Your challenge will be to ensure all changes are pushed to you/other ansible-folk. It works a treat, but considerable engineering/research/testing required. DR. On Monday, January 30, 2017 at 7:24:41 PM UTC, Dick Davies wrote: > > Does anyone here a good tip for managing parts of xml files > (like lineinfile / blockinfile but xml-aware)? > > I have several fairly complex apps to manage, each with their own role. > Ideally they'd each manage their own subset of the domain.xml, > which rules out a single domain.xml template. > > > ansible-xml looked perfect until I tried it and found it doesn't actually > work :( [ https://github.com/cmprescott/ansible-xml/issues/55 ] > > My Plan B (make that 'H' by now) would be to have a master template > that pulled in 'sub-templates' via lookup_template() , but that sounds > like > it'll get messy fast and involve hardcoding roles together. > > Does everyone just template their XML? Are you crazy kids all using > YAML and JSON nowadays? > -- 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/e94a6ebf-b7d8-4389-aef7-00107c47f16f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
