Example Ansible script for Jboss-cli commands

Latest response

I want to know how to run following command with an ansible playbook and need to get the output as well.

/subsystem=datasources/data-source=ExampleDS/statistics=pool :read-resource(recursive=true, include-runtime=true)


Even am looking out for the same, could someone share the how to achieve this?

May be, use the below in Shell module, register the output and debug;

/bin/jboss-cli.sh --connect --commands=/subsystem=datasources/data-source=ExampleDS/statistics=pool :read-resource(recursive=true, include-runtime=true)