diff --git a/NEWS b/NEWS index 6192ab3cd008a0861b41c60ce590f772489f185b..fa8cdaa07381a4c0dd39a96c6bcf3dfd10ca6ba8 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,12 @@ -release/005.009 (2017-07-07) +unreleased (2017-??-??) - [ntp] Push "tinker-panic 0" to the top of the ntp.conf file to help + Starting the work to make the code Puppet 4 compatible. [adamhl] + +release/005.009 (2017-07-07) + + [ntp] Push "tinker-panic 0" to the top of the ntp.conf file to help address the timekeeping problem with vmware. This means always reset - the clock, even if the new time is more than 1000s away from the + the clock, even if the new time is more than 1000s away from the current system time. [ljlgeek] release/005.008 (2017-06-25) diff --git a/manifests/ipmi.pp b/manifests/ipmi.pp index ef894599413469e534da096feff94d6abd37aab6..96a3ca3d77eb58760aaa54ff44cc08e4bc659eb4 100644 --- a/manifests/ipmi.pp +++ b/manifests/ipmi.pp @@ -13,8 +13,8 @@ # ensure => absent, # } # -# WARNING: On a running system, changing base::ipmi::ensure from present to -# absent may not work properly, depending on what user-space stuff is using +# WARNING: On a running system, changing base::ipmi::ensure from present to +# absent may not work properly, depending on what user-space stuff is using # IPMI functionality. If you get errors, restart. class base::ipmi ( @@ -50,7 +50,15 @@ class base::ipmi ( # For Debian 8+, the package brings in everything it needs by # default. But, if we are re-enabling we need to recover a file that # we deleted. We then have to trigger systemd to load modules. - if $::operatingsystem == 'Debian' and $::lsbmajdistrelease >= 8 { + if ($::puppetversion =~ /^3/) { + $operatingsystem = $::operatingsystem + $lsdbmajdistrelease = $::lsdbmajdistrelease + } else { + $operatingsystem = $facts['os']['name'] + $lsdbmajdistrelease = Integer($facts['os']['release']['major']) + } + + if (($operatingsystem == 'Debian') and ($lsdbmajdistrelease >= 8)) { exec { 'Re-create /usr/lib/modules-load.d/ipmievd.conf': command => '/usr/bin/apt-get install --reinstall ipmitool', creates => '/usr/lib/modules-load.d/ipmievd.conf', diff --git a/manifests/iptables/fragment.pp b/manifests/iptables/fragment.pp index 03379aea3bf0adc9c101318b6d9a1920b4697a1c..cb8377208e8b36f540a112604af8abc6a14ee6e6 100644 --- a/manifests/iptables/fragment.pp +++ b/manifests/iptables/fragment.pp @@ -55,7 +55,7 @@ define base::iptables::fragment($ensure, } default: { - crit "Invalid ensure value: $ensure" + fail "Invalid ensure value: $ensure" } } -} \ No newline at end of file +} diff --git a/manifests/os.pp b/manifests/os.pp index 5158717c8bb49a228263e6e4d321228090a8a713..ad0d79a76a9e068f06b3326abf56368144f24d31 100644 --- a/manifests/os.pp +++ b/manifests/os.pp @@ -2,7 +2,7 @@ # here is specific to the version of Linux we're running and is handled by # the appropriate separate class. class base::os { - + case $::operatingsystem { 'Debian': { include base::os::debian } 'Ubuntu': { include base::os::ubuntu } @@ -11,7 +11,7 @@ class base::os { 'OracleLinux': { include base::os::oraclelinux } default: { include base::os::debian } } - + base::os::motd { '/etc/motd': ensure => present, template => 'base/os/motd.erb', @@ -33,8 +33,8 @@ class base::os { # 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', + 'RedHat' => '/etc/sysconfig/iptables', + default => '/etc/iptables/general', } } diff --git a/manifests/out_of_date/client.pp b/manifests/out_of_date/client.pp index a33c501b91c785f6f2362ccb167d0fbde3d6e1b3..4d9917af034e7bca22fc47dc32f891011c664908 100644 --- a/manifests/out_of_date/client.pp +++ b/manifests/out_of_date/client.pp @@ -32,7 +32,7 @@ class base::out_of_date::client::disabled inherits base::out_of_date::client { } class base::out_of_date::client::dev inherits base::out_of_date::client { - File ['/etc/out-of-date/client.conf'] { + File['/etc/out-of-date/client.conf'] { source => 'puppet:///modules/base/out-of-date/etc/out-of-date/client-dev.conf' } } diff --git a/manifests/pam.pp b/manifests/pam.pp index 6d10f4f4c60d37237c69177f890d8709ffb2776a..dddb294cea908cc1b22498713a5c8140dccb2bf4 100644 --- a/manifests/pam.pp +++ b/manifests/pam.pp @@ -5,15 +5,15 @@ # Basic class, for most systems. class base::pam { case $osfamily { - RedHat: { include base::pam::redhat } - Debian: { include base::pam::debian } + 'RedHat': { include base::pam::redhat } + 'Debian': { include base::pam::debian } } } # Allows access to all users with a SUNet ID. Mostly for timeshares and such. class base::pam::ldap inherits base::pam { case $osfamily { - RedHat: { include base::pam::redhat::ldap } - Debian: { include base::pam::debian::ldap } + 'RedHat': { include base::pam::redhat::ldap } + 'Debian': { include base::pam::debian::ldap } } } diff --git a/manifests/pam/debian.pp b/manifests/pam/debian.pp index 7d96a8abf64870aa6bfd7236fe4dc1d2e236132d..9266e8ca8703bfcedaccd6c12099d21a2ffae7a0 100644 --- a/manifests/pam/debian.pp +++ b/manifests/pam/debian.pp @@ -6,8 +6,14 @@ class base::pam::debian { package { 'libpam-krb5': ensure => present } package { 'libpam-afs-session': ensure => present } + if ($::puppetversion =~ /^3/) { + $lsdbmajdistrelease = $::lsdbmajdistrelease + } else { + $lsdbmajdistrelease = Integer($facts['os']['release']['major']) + } + # Starting with Debian jessie, pam-auth-update manages the common PAM files. - if ($::lsdbmajdistrelease < 8) { + if ($lsdbmajdistrelease < 8) { file { '/etc/pam.d/common-auth': source => 'puppet:///modules/base/pam/etc/pam.d/common-auth', diff --git a/manifests/postfix/map.pp b/manifests/postfix/map.pp index a67d850465fdbc3b5e999662976b64a73635d4c0..41b983c08abae9dd9814e521df5fffa3cbc084c5 100644 --- a/manifests/postfix/map.pp +++ b/manifests/postfix/map.pp @@ -28,7 +28,7 @@ define base::postfix::map( $source = undef) { if ($type != 'hash') and ($type != 'btree') { - crit "unknown Postfix map type $type" + fail "unknown Postfix map type $type" } file { $name: diff --git a/manifests/puppetclient/config.pp b/manifests/puppetclient/config.pp index f2498855a6be53d457962178edb2dc1b1c15ec27..637f5bfa5a6395f45eb6cd15a2ecc7d07a5c50b4 100644 --- a/manifests/puppetclient/config.pp +++ b/manifests/puppetclient/config.pp @@ -54,7 +54,7 @@ define base::puppetclient::config( } } absent: { file { $name: ensure => absent } } - default: { crit "Invalid ensure value: ${ensure}" } + default: { fail "Invalid ensure value: ${ensure}" } } file { $defaultfile: diff --git a/manifests/ssh.pp b/manifests/ssh.pp index b459919be9bd7cabbe4d2615f6cddaf6530b9c9f..a6e9ff6090c118f423f23f8888e447c4968d8d0d 100644 --- a/manifests/ssh.pp +++ b/manifests/ssh.pp @@ -115,8 +115,8 @@ class base::ssh( service { 'ssh': ensure => running, name => $::osfamily ? { - Debian => 'ssh', - RedHat => 'sshd', + 'Debian' => 'ssh', + 'RedHat' => 'sshd', }, require => Package['openssh-server'], }