diff --git a/manifests/os.pp b/manifests/os.pp index ad0d79a76a9e068f06b3326abf56368144f24d31..87be6ecac1ce03332e53d7fb514d7a855e685b92 100644 --- a/manifests/os.pp +++ b/manifests/os.pp @@ -1,7 +1,11 @@ # 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', + } } }