Skip to content
Snippets Groups Projects
Verified Commit 071020fe authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

allow disabling of some difficult facts

parent 1ae4a2d3
No related branches found
No related tags found
1 merge request!7Puppet5 lonlone
# General configuration of the basic operating system. Nearly everything
# here is specific to the version of Linux we're running and is handled by
# the appropriate separate class.
class base::os {
class base::os(
$enable_dell_warranty_facts = false,
$enable_iptables_facts = false,
){
case $::operatingsystem {
'Debian': { include base::os::debian }
......@@ -17,24 +21,29 @@ class base::os {
template => 'base/os/motd.erb',
}
# Get warranty expiration facts for Dell hardware.
if ($::manufacturer =~ /Dell/) {
file {
'/etc/cron.d/dell-warranty-facts':
source => 'puppet:///modules/base/os/etc/cron.d/dell-warranty-facts';
'/var/lib/puppet/sufact/su_dell_warranty_days':
ensure => present;
'/var/lib/puppet/sufact/su_dell_warranty_end':
ensure => present;
# Get warranty expiration facts for Dell hardware, but only if
# the $enable_dell_warranty_facts parameter is true.
if ($enable_dell_warranty_facts) {
if ($::manufacturer =~ /Dell/) {
file {
'/etc/cron.d/dell-warranty-facts':
source => 'puppet:///modules/base/os/etc/cron.d/dell-warranty-facts';
'/var/lib/puppet/sufact/su_dell_warranty_days':
ensure => present;
'/var/lib/puppet/sufact/su_dell_warranty_end':
ensure => present;
}
include packages::curl
}
include packages::curl
}
# Generate an iptables fact for the firewall team to query.
file { '/var/lib/puppet/sufact/su_iptables':
ensure => $::osfamily ? {
'RedHat' => '/etc/sysconfig/iptables',
default => '/etc/iptables/general',
if ($enable_iptables_facts) {
file { '/var/lib/puppet/sufact/su_iptables':
ensure => $::osfamily ? {
'RedHat' => '/etc/sysconfig/iptables',
default => '/etc/iptables/general',
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment