Skip to content

Instantly share code, notes, and snippets.

@iversond
Created July 28, 2017 13:31
Show Gist options
  • Save iversond/84ea73b8d4d380292914aa88f622b26e to your computer and use it in GitHub Desktop.
Save iversond/84ea73b8d4d380292914aa88f622b26e to your computer and use it in GitHub Desktop.
Puppet manifest to update the WebProfile in configuration.properties
$pia_domain_list = hiera('pia_domain_list')
if $pia_domain_list {
$pia_domain_list.each |$domain_name, $pia_domain_info| {
$baseWebPath = "${pia_domain_info['ps_cfg_home_dir']}\\webserv\\${domain_name}\\applications\\peoplesoft\\PORTAL.war"
$root_signon_url = $pia_domain_info['root_signon_url']
$pia_site_list = $pia_domain_info['site_list']
$pia_site_list.each |$site_name, $site_info| {
$htmlPath = "${baseWebPath}\\${site_name}\\"
$configPath = "${baseWebPath}\\WEB-INF\\psftdocs\\${site_name}"
$webprofile_settings = $site_info['webprofile_settings']
file_line { "${site_name}-webProfile":
path => "${configPath}/configuration.properties",
match => 'WebProfile=',
line => "WebProfile=${webprofile_settings['web_profile_name']}",
}
} # end pia_site_list
} # end pia_domain_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment