Comments (3)
I think something like $custom_config
would work. My only hesitation with $custom_fragment
is the word fragment because that's only a valid idea with concat module and no real reason to use concat module here, instead can just deploy a second config file and make it behave like the one provided from this module. One pattern that is useful is making it two parameters, custom_config_source
and custom_config_content
, both being undef and so a site can choose to provide a plain file or content (template).
from puppet-module-keycloak.
My initial idea was to add something like this to the config.cli.erb:
...
<%- if scope['keycloak::custom_config'] -%>
<%= scope['keycloak::custom_config'] %>
<%- end -%>
And then people can do:
class { 'keycloak':
...
custom_config => epp('apps/keycloak/custom.config'),
...
}
Also they can pass a simple string and that will work too.
I am not sure about having more than one config.cli files though. This might add complexity since we will need to run https://github.com/treydock/puppet-module-keycloak/blob/master/manifests/config.pp#L66 twice. Also it would make things more difficult to debug, since there are 2 different files changing the config in the standalone.xml.
from puppet-module-keycloak.
I think what makes the most sense to only execute the jboss CLI once is this:
concat { "${keycloak::install_base}/config.cli":
...
notify => Exec['jboss-cli.sh --file=config.cli']
}
concat::fragment { 'config.cli-keycloak':
target => "${keycloak::install_base}/config.cli",
content => template('keycloak/config.cli.erb'),
order => '00',
}
if $custom_config_content or $custom_config_source {
concat::fragment { 'config.cli-custom':
target => "${keycloak::install_base}/config.cli",
content => $custom_config_content,
source => $custom_config_source,
order => '01',
}
}
This way a site can choose to provide custom_config_source => 'puppet:///site_modules/profile/keycloak.cli'
or like your example they can provide a epp or erb template via custom_config_content
.
from puppet-module-keycloak.
Related Issues (20)
- Missing usermodel_clientRoleMapping_clientId property from keycloak_client_protocol_mapper resource type HOT 2
- Support for Debian 11 HOT 2
- Hiding /auth part of URL behind reverse proxy fails Puppet run due to connectivity check HOT 5
- parameter 'syslog_hostname' expects a Stdlib::Host [...] value, got String HOT 5
- Realms with spaces in the name fail to be fully created HOT 1
- The attribute 'login_with_email_allowed' has already been set HOT 2
- support HA deployments HOT 3
- KC 19: WARNING: The '--auto-build' option for 'start' command is DEPRECATED HOT 1
- kcadm-wrapper.sh does not quote variables HOT 3
- How to set hostname-admin and hostname-admin-url?
- Allow keycloak.v2 theme on defined realms HOT 2
- remove default value for hostname / make hostname optional HOT 2
- http_relative_path parameter is not taken into account in keycloak_validator.rb HOT 1
- v9.3.3 relative_path parameter fix for keycloak_validator.rb does not work
- DB Encoding Issue on Ubunutu 20.04 HOT 9
- Custom `java_home` not actually used on RHEL-based distros HOT 1
- Support for realm default locale HOT 1
- Init class parameter values are confusing HOT 5
- Add cache_policy attribute to keycloak_ldap_user_provider type HOT 1
- Module keeps recreating truststore file since upgrade to 11.0.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-module-keycloak.