Thanks Jeroen glad that works at least - it'd be my fallback position if this driving jboss-cli gets ugly. Do you get many false positives on the diffs, or is JBoss OK at keeping the DOM structure more or less constant (last time I tried something like that was early tomcat releases, and it seemed to shuffle XML as much as it could when it synced back)?
On 23 June 2016 at 11:33, Jeroen Hoekx <[email protected]> wrote: > Hi, > > On 23 June 2016 at 10:44, Dick Davies <[email protected]> wrote: > >> Fun facts: >> >> * there are 0 playbooks out there that manage JBoss in an idempotent way >> * JBoss is actively CM hostile (like, _Jenkins_ hostile) >> >> The ansible-xml library looks like it would do a decent job of >> managing config files but as I said JBoss would need to be shut down. >> I want this to be safe to run without downtime if no deltas are >> needed. > > We've been managing JBoss with Ansible for about 3 years now in an > idempotent way. I agree that JBoss does not make it easy for a > configuration management system like Ansible. > > This is our approach: > - we store the configuration xml (standalone.xml in our case) as an > artifact in our build process > - during deployment we template the xml jinja template in a different location > - we compare it to the current xml config > - when there is a diff, we print it and stop JBoss, move the new > config in place and restart JBoss > - then we deploy the new artifacts using the jboss module > > There are two caveats: > - It is important to not deploy through the cli, as this changes the > xml. Filesystem deployments avoid that. > - Keep the xml namespaces up to date with your JBoss version, as JBoss > automatically converts old xmlns declarations to new ones. > > It is rather different than your proposed approach, but perhaps this > pragmatic way of configuring JBoss avoids the work you would have to > put in a module. > > Greetings, > > Jeroen > > -- > 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/CAAAQQmCBH8H-7S09os6-UKnkTzR-K3aWnhhxqvwMyB8bFRKm8w%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAK5eLPSqszYN8ZXRyMxJQD0xHo-3Y9pQO7vhzKvzZ_s20xrc-Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
