From 5023e13977cd136b88735edaeee5688027b6c72b Mon Sep 17 00:00:00 2001 From: Adam Henry Lewenberg <adamhl@stanford.edu> Date: Thu, 3 Aug 2017 07:21:30 -0700 Subject: [PATCH] fix a Puppet 4 issue --- NEWS | 4 ++-- manifests/ipmi.pp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a2a10a5..039120e 100644 --- a/NEWS +++ b/NEWS @@ -2,8 +2,8 @@ unreleased (2017-??-??) Starting the work to make the code Puppet 4 compatible. [adamhl] - [ssh] Add $extra_gssapi_only_users parameter to list accounts extra - accounts that should skip Duo. [adamhl] + [ssh] Add $extra_gssapi_only_users parameter listing any extra + accounts that should skip Duo (i.e., service accounts). [adamhl] release/005.009 (2017-07-07) diff --git a/manifests/ipmi.pp b/manifests/ipmi.pp index b961fbf..ea5e48d 100644 --- a/manifests/ipmi.pp +++ b/manifests/ipmi.pp @@ -50,7 +50,11 @@ 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 ($::lsdbmajdistrelease >= 8)) { + # + # Note: we add 0 to $::lsdbmajdistrelease to make the numerical + # comparison work (this way, the code works in both Puppet 3 and + # Puppet 4). + if (($::operatingsystem == 'Debian') and (0 + $::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', -- GitLab