I ased a few weeks ago about taming JBoss (AS7.1 / EAP6) with Ansible (1.9.x) -
started in on it this week and I'm hitting the hurdles I'd predicted then
(bit of a war story incoming, feel free to skip to the 'Help!' section):

Fun facts:

* there are 0 playbooks out there that manage JBoss in an idempotent way
* JBoss is actively CM hostile (like, _Jenkins_ hostile)

the gist is JBoss writes its domain.xml whenever it feels like it, so
it's not safe to template that directly. Most guides recommend using
the jboss-cli tool to a) ensure uncorrupted config and b) avoid some
restarts.


I can do that sort of thing with a command: but I'd need to run a
'getter' command: first to check the state of the config, which is a
bit ugly if you're doing lots of changes.

There's a tool called 'jcliff' ( https://github.com/bserdar/jcliff)
which tries to solve this problem,
and has the advantage of  being idempotent. Downside is it's docs are
pretty dense, it only supports a subset of the CLIs DMR data
structures , and domain mode support is a hack.

I've spent an hour trying to figure out how to get it to change a log
level and most of that was debugging jcliff rather than JBoss.
At this point its looking uglier than just '2 commands per config
change' plan above.

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.

Finally, there are a load of JBoss nerd^W experts here so any config
snippets are likely to be written by them rather than me, so deltas
that support the JBoss DMR are a bonus.

Help!

At this point I think I'm going to have to go with plan A - run a
jboss-cli getter, then a jboss-cli setter if needed
Does anyone know of a module that wraps commands like this?

I've never written an Ansible module before but this seems like it
might be a plan.
If anyone has ever tamed JBoss and wants to tell me the secret, that'd
be cool too :)

Thanks for listening.

-- 
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/CAK5eLPTUBTHO%2B7kcg_mEWBL0sj0FmhsbfsuWm43ih7XstSD%2BYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to