Puppet Class: ora_config::fact_caching
- Defined in:
- manifests/fact_caching.pp
Summary
This class ensure's that the ora_config facts that can be cached and are cached with the correct settings.Overview
::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.
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'manifests/fact_caching.pp', line 45
class ora_config::fact_caching (
Boolean $enabled,
Optional[String[1]] $ora_asm_diskgroups_ttl,
Optional[String[1]] $ora_asm_running_ttl,
Optional[String[1]] $ora_asm_volumes_ttl,
Optional[String[1]] $ora_is_cluster_ttl,
Optional[String[1]] $ora_is_container_db_ttl,
Optional[String[1]] $ora_is_pluggable_db_ttl,
Optional[String[1]] $ora_is_primary_db_ttl,
Optional[String[1]] $ora_is_root_db_ttl,
Optional[String[1]] $ora_is_seed_db_ttl,
Optional[String[1]] $ora_version_ttl
) {
if $enabled {
include ora_config::clear_caches
#
# If enabled, we need to enable the force-dot-resolution
# setting for facter.
#
unless defined(Fact_setting['force-dot-resolution']) {
fact_setting { 'force-dot-resolution':
value => true,
}
}
fact_config { 'ora_is_container_db':
ttl => $ora_is_container_db_ttl,
}
fact_config { 'ora_is_root_db':
ttl => $ora_is_root_db_ttl,
}
fact_config { 'ora_is_seed_db':
ttl => $ora_is_seed_db_ttl,
}
fact_config { 'ora_is_pluggable_db':
ttl => $ora_is_pluggable_db_ttl,
}
fact_config { 'ora_is_cluster':
ttl => $ora_is_cluster_ttl,
}
fact_config { 'ora_version':
ttl => $ora_version_ttl,
}
fact_config { 'ora_asm_diskgroups':
ttl => $ora_asm_diskgroups_ttl,
}
fact_config { 'ora_asm_volumes':
ttl => $ora_asm_volumes_ttl,
}
fact_config { 'ora_is_primary_db':
ttl => $ora_is_primary_db_ttl,
}
fact_config { 'ora_asm_running':
ttl => $ora_asm_running_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 ora_config facts
#
$ora_config_facts = [
'ora_is_container_db',
'ora_is_root_db',
'ora_is_seed_db',
'ora_is_pluggable_db',
'ora_is_cluster',
'ora_version',
'ora_asm_diskgroups',
'ora_asm_volumes',
'ora_is_primary_db',
'ora_asm_running',
]
fact_config { $ora_config_facts:
ttl => absent,
}
}
} }
|