Maintenance: GitLab GKE platform upgrade and software upgrade on Friday August 6 at 9 p.m. Service may not be available between 9 p.m. and 9:20 p.m.

Verified Commit f0bf1edb authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

some work on Puppet 4 compatibility

parent dfbf0d52
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)
......
......@@ -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',
......
......@@ -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
}
......@@ -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',
}
}
......
......@@ -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'
}
}
......@@ -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 }
}
}
......@@ -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',
......
......@@ -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:
......
......@@ -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:
......
......@@ -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'],
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment