Skip to content

Instantly share code, notes, and snippets.

@ericbisme
Created August 2, 2017 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericbisme/fdc142f3f58fcfc0713bd553e88716d4 to your computer and use it in GitHub Desktop.
Save ericbisme/fdc142f3f58fcfc0713bd553e88716d4 to your computer and use it in GitHub Desktop.
# Install Grey Heller ERP Firewall Web files
class greyheller::erpfirewall::web (
$archive_location = hiera('erp_firewall_basedir'),
$psft_install_user_name = hiera('psft_install_user_name'),
$psft_runtime_user_name = hiera('psft_runtime_user_name'),
$ps_home_location = hiera('ps_home_location'),
$ps_config_home = hiera('ps_config_home'),
$pia_domain_name = hiera('pia_domain_name'),
$failopen = false,
$enabled = true,
){
if $enabled { $inactive_status = 'absent' }
else { $inactive_status = 'file' }
if $failopen { $failopen_status = 'true' }
else { $failopen_status = 'false' }
exec { 'erpfirewall_web':
command => "/usr/bin/su -m -s /bin/bash - ${psft_runtime_user_name} -c \"${archive_location}/WebServer/Unix/gh_firewall_web.bin \
${ps_config_home} ${pia_domain_name}\"",
creates => "${ps_config_home}/webserv/${pia_domain_name}/applications/peoplesoft/PORTAL.war/WEB-INF/gsdocs",
}
file { "${ps_config_home}/webserv/${pia_domain_name}/applications/peoplesoft/PORTAL.war/WEB-INF/lib/psjoa.jar" :
source => "${ps_home_location}/appserv/classes/psjoa.jar",
owner => $psft_runtime_user_name,
mode => '0755',
require => Exec['erpfirewall_web'],
}
augeas { 'erp-failopen':
lens => 'Xml.lns',
incl => "${ps_config_home}/webserv/${pia_domain_name}/applications/peoplesoft/PORTAL.war/WEB-INF/web.xml",
context => "/files/${ps_config_home}/webserv/${pia_domain_name}/applications/peoplesoft/PORTAL.war/WEB-INF/web.xml/web-app",
changes => "set filter[filter-name/#text='gs_erp_firewall']/init-param/param-value/#text ${failopen_status}",
require => Exec['erpfirewall_web'],
}
file { "${ps_config_home}/webserv/${pia_domain_name}/applications/peoplesoft/PORTAL.war/WEB-INF/gsdocs/gs_erp_firewall_inactive.txt" :
ensure => $inactive_status,
owner => $psft_runtime_user_name,
mode => '0755',
require => Exec['erpfirewall_web'],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment