with following script I'm able to add provider to my keycloak instance.
embed-server --server-config=standalone.xml
/subsystem=keycloak-server:list-add(name=providers, value=module:com.example.InviteUserRequiredAction)
stop-embedded-server
However when the application is restarted it's added twice (or that many times the server is restarted). I'd like to add the provider only conditionally, but I can't find the way how to query existence of provider that I'm adding.
so finally it could look like:
if (outcome != success) of /subsystem=keycloak-server:here-should-be-the-query
...
end-if
Can somebody please tell me how to query the providers
with name module:com.example.InviteUserRequiredAction
?
Thanks