Puppet Class: wls_install::fact_caching
- Defined in:
- manifests/fact_caching.pp
Summary
This class ensure's that the wls_install facts that can be cached, are cached with the correct settings.Overview
wls_install::fact_caching
You can change all TTL settings for the facts if an other setting is more fitting for your setup.
See the file “LICENSE” for the full license governing this code.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'manifests/fact_caching.pp', line 44
class wls_install::fact_caching (
Boolean $enabled,
Optional[String[1]] $installed_features_ttl,
Optional[String[1]] $installed_patches_ttl,
Optional[String[1]] $opatch_version_ttl,
Optional[String[1]] $ords_homes_ttl,
Optional[String[1]] $product_version_ttl,
Optional[String[1]] $running_domains_ttl,
Optional[String[1]] $wls_install_domains_ttl,
Optional[String[1]] $wls_install_inventory_loc_ttl
) {
if $enabled {
include wls_install::clear_caches
#
# If enabled, we need to enable the force-dot-resolution
# setting for facter.
#
fact_setting { 'force-dot-resolution':
value => true,
}
fact_config { 'wls_install_homes.product_version':
ttl => $product_version_ttl,
}
fact_config { 'wls_install_homes.opatch_version':
ttl => $opatch_version_ttl,
}
fact_config { 'wls_install_homes.installed_features':
ttl => $installed_features_ttl,
}
fact_config { 'wls_install_homes.running_domains':
ttl => $running_domains_ttl,
}
fact_config { 'wls_install_homes.installed_patches':
ttl => $installed_patches_ttl,
}
fact_config { 'wls_install_inventory_loc':
ttl => $wls_install_inventory_loc_ttl,
}
fact_config { 'ords_homes':
ttl => $ords_homes_ttl,
}
} else {
#
# On puppet versions older than V6, the required libs
# for fact_config are not installed. Because it also doesn't
# serve any purpose, we skip this part on those versions.
#
if versioncmp($clientversion, '6.0.0') != -1 {
#
# Disable fact caching for all wls_install facts
#
$wls_install_facts = [
'wls_install_homes.product_version',
'wls_install_homes.opatch_version',
'wls_install_homes.installed_features',
'wls_install_homes.running_domains',
'wls_install_homes.installed_patches',
'wls_install_inventory_loc',
'ords_homes',
]
fact_config { $wls_install_facts:
ttl => absent,
}
}
}
}
|