| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- # == Define: wls::utils::orainst
- #
- # creates oraInst.loc
- #
- #
- ##
- define wls::utils::orainst( $oraInventory = undef,
- $group = 'dba',
- ) {
- case $operatingsystem {
- CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES: {
- $oraInstPath = "/etc"
- }
- Solaris: {
- $oraInstPath = "/var/opt"
- }
- windows: {
- $oraInstPath = "C:\\Program Files\\Oracle\\Inventory"
- }
- }
-
- case $operatingsystem {
- CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES, Solaris: {
- if ! defined(File["${oraInstPath}/oraInst.loc"]) {
- file { "${oraInstPath}/oraInst.loc":
- ensure => present,
- content => template("wls/utils/oraInst.loc.erb"),
- }
- }
- }
- windows: {
- if ! defined(Registry_Key["HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle"]) {
- registry_key { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle":
- ensure => present,
- }
- }
- if ! defined(Registry_Value ["HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle\\inst_loc"]) {
- registry_value { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle\\inst_loc":
- type => string,
- data => $oraInstPath,
- require => Registry_Key["HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle"],
- }
- }
- }
- }
- }
|