grep and find for example) where it is exactly you need to configure the next change, or having to use configuration items that need to be changed as soon as your organization introduces the next generation operating systems or distribution version, here's a set of Best Practices, or actually Tips & Tricks.
$operatingsystem and $operatingsystemrelease, $operatingsystemversion or $lsbdistrelease variables relate directly to specific operating system resources, configuration file locations, package names and most importantly, settings you can or cannot use in the configuration files for specific applications[4]. Using the $operatingsystem, $operatingsystemrelease, $operatingsystemversion and/or $lsbdistrelease variables (set from Facter) help you determine the Operating System (Distribution) and Version.
$operatingsystemrelease, while others set $lsbdistrelease. If these variables need to be used in manifests, you really do not want to use these both because in your manifests all you are interested in is the Operating System Version. Using the following snippet of code in site.pp enables you to use $os and $osver throughout your manifests.
# Get facts and give them a good, good name
$os = $operatingsystem
case $os {
"Fedora", "CentOS", "RedHat": {
$osver = $lsbdistrelease
}
"Debian", "SuSE', "OpenSuSE": {
$osver = $operatingsystemrelease
}
"Darwin": {
$osver = $operatingsystemrelease
}
}
[4]
Enterprise Linux 3 distributions for example have OpenSSH Server versions that do not use, and are incompatible with, the UsePAM setting in /etc/ssh/sshd_config. In these cases, you would want the configuration file for EL-3 to come from a different location then for the EL-4 and EL-5 distributions that do take UsePAM because of the OpenSSH Server package versions they ship.