Skip to content

Instantly share code, notes, and snippets.

@iversond
Created December 7, 2016 20:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iversond/927089995d8f00fee024e990dfe658c6 to your computer and use it in GitHub Desktop.
Puppet manifest to update App Server config file from psft_customizations.yaml config_settings: section
$ensure = hiera('ensure')
$appserver_domain_list = hiera('appserver_domain_list')
$appserver_domain_list.each |$domain_name, $appserver_domain_info| {
notice("Configuration for AppServer domain ${domain_name}")
$cfgFile = "${appserver_domain_info['ps_cfg_home_dir']}\\appserv\\${domain_name}\\psappsrv.cfg"
$config_settings = $appserver_domain_info['config_settings']
$config_settings.each |$setting, $config_info| {
$setting_array = split($setting, "/")
# notice("Header ${setting_array[0]}")
# notice("Setting ${setting_array[1]}")
# notice("Config Info ${config_info}")
ini_setting {"PSAPPRV-${domain_name}-${setting_array[0]}-${setting_array[1]}":
ensure => $ensure,
path => $cfgFile,
section => $setting_array[0],
setting => $setting_array[1],
value => $config_info,
}
} # config_settings:
} # appserv_domain_list:
@iversond
Copy link
Author

iversond commented Dec 7, 2016

If you specify Security/DomainConnectionPwd: in the config_settings: section, the password will be added to psappsrv.cfg as an unencrypted value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment