Skip to content

Instantly share code, notes, and snippets.

@accasey
Created June 28, 2018 09:23
Show Gist options
  • Select an option

  • Save accasey/afdcb6484d6421b69a421b25986a664a to your computer and use it in GitHub Desktop.

Select an option

Save accasey/afdcb6484d6421b69a421b25986a664a to your computer and use it in GitHub Desktop.
Puppet manifests
cd /d d:\psoft\dpk\puppet\production\manifests
rem like this:
"C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" apply --confdir=d:\psoft\dpk\puppet --environment=CMADEV02 setWinServiceUser.pp --modulepath d:\psoft\dpk\puppet\production\modules --debug --trace
rem or like this:
"C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" apply -e "include ::pt_profile::pt_tools_preboot_config" --environment=CMASBX90 --modulepath d:\psoft\dpk\puppet\production\modules --confdir=d:\psoft\dpk\puppet site.pp --debug --trace
exec { 'eyaml_editor':
command => "$env_comspec /c setx EDITOR \"notepad.exe\" /M",
}
$eyaml_location_dir = hiera('eyaml_location')
$eyaml_location_dir_norm = normalize_path($eyaml_location_dir)
exec { 'eyaml_config':
command => "$env_comspec /c setx EYAML_CONFIG \"${eyaml_location_dir_norm}\" /M",
}
$domain_user = hiera('domain_user', undef)
$domain_password = hiera('domain_password', undef)
$pia_domain_list = hiera('pia_domain_list')
$pia_domain_list.each | $domain_name, $pia_domain_info | {
exec { "${domain_name}-pia":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"PsftPIADomain${domain_name}Service\" obj=\"${domain_user}\" password=\"${domain_password}\"",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"PsftPIADomain${domain_name}Service\" | find \"SERVICE_START_NAME\" | find \"${domain_user}\""
}
}
$app_domain_list = hiera('appserver_domain_list')
$app_domain_list.each | $domain_name, $app_domain_info | {
exec { "${domain_name}-app":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"PsftAppServerDomain${domain_name}Service\" obj=\"${domain_user}\" password=\"${domain_password}\"",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"PsftAppServerDomain${domain_name}Service\" | find \"SERVICE_START_NAME\" | find \"${domain_user}\""
}
}
$prcs_domain_list = hiera('prcs_domain_list')
$prcs_domain_list.each | $domain_name, $prcs_domain_info | {
exec { "${domain_name}-prcs":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"PsftPrcsDomain${domain_name}Service\" obj=\"${domain_user}\" password=\"${domain_password}\"",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"PsftPrcsDomain${domain_name}Service\" | find \"SERVICE_START_NAME\" | find \"${domain_user}\""
}
}
exec { "tlistenService-stop":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe stop \"TUXEDO 12.2.2.0.0_VS2015 Listener on Port 3050\"",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"TUXEDO 12.2.2.0.0_VS2015 Listener on Port 3050\" | find \"START_TYPE\" | find \"DISABLED\""
}
exec { "tlistenService-disable":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"TUXEDO 12.2.2.0.0_VS2015 Listener on Port 3050\" start= disabled",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"TUXEDO 12.2.2.0.0_VS2015 Listener on Port 3050\" | find \"START_TYPE\" | find \"DISABLED\""
}
exec { "procMgrService-update":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"ORACLE ProcMGR V12.2.2.0.0_VS2015\" type=own obj=\"${domain_user}\" password=\"${domain_password}\"",
unless => "C:\\Windows\\System32\\cmd.exe /c sc.exe qc \"ORACLE ProcMGR V12.2.2.0.0_VS2015\" | find \"SERVICE_START_NAME\" | find \"${domain_user}\""
}
# notify { 'RegionTest':
# withpath => true,
# name => "my region is ${::region}",
# }
# notify { 'ACM_Preboot_Test':
# withpath => true,
# name => hiera_hash('component_preboot_setup_list'),
# }
# notify { 'ACM_Postboot_Test':
# withpath => true,
# name => hiera_hash('component_postboot_setup_list'),
# }
notify { 'Appserver_Test':
withpath => true,
name => hiera_hash('appserver_domain_list'),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment