We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Looking at the issues list I've encountered the issue where the KeycloakDS datasource can't be changed because of the expression on the jdbc URL.
Trying to bypass this issue, I've tried removing the old H2 datasource and create it again but only if the driver is set to h2 using:
wildfly::cli { 'Remove old KeycloakDS': command => '/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:remove', unless => '(driver-name == h2) of /profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name)', }
But every time I do a puppet run the cli command runs even tho the driver-name is no longer h2.
before: /profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "h2" }
/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "h2" }
after: /profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "mysql" }
/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "mysql" }
Is that a supported way to do "unless" ?
Is there another way to run a CLI command where it tests for a specific value of the resource?
The text was updated successfully, but these errors were encountered:
You should be able to do it with:
wildfly::cli { 'Remove old KeycloakDS': command => '/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:remove', unless => '(result == h2) of /profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name)', }
Sorry, something went wrong.
In fact, if I understood correct. You'd need onlyif instead of unless.
No branches or pull requests
Hi,
Looking at the issues list I've encountered the issue where the KeycloakDS datasource can't be changed because of the expression on the jdbc URL.
Trying to bypass this issue, I've tried removing the old H2 datasource and create it again but only if the driver is set to h2 using:
But every time I do a puppet run the cli command runs even tho the driver-name is no longer h2.
before:
/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "h2" }
after:
/profile=auth-server-clustered/subsystem=datasources/data-source=KeycloakDS:read-attribute(name=driver-name) { "outcome" => "success", "result" => "mysql" }
Is that a supported way to do "unless" ?
Is there another way to run a CLI command where it tests for a specific value of the resource?
The text was updated successfully, but these errors were encountered: