diff --git a/CHANGELOG b/CHANGELOG index 6e643da..a38c155 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +* Wed Dec 06 2023 Mike Riddle - 6.17.1 +- The module will now correctly handle a situation where /etc/localhost doesn't exist + * Mon Oct 23 2023 Steven Pritchard - 6.17.0 - [puppetsync] Add EL9 support diff --git a/manifests/server.pp b/manifests/server.pp index ea194f1..1cb3bae 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -37,8 +37,16 @@ require => Package['openssh-server'] } + # It is possible that /etc/localtime won't exist on the system. + # In the case where it doesn't simply pull the timezone file from + # /usr/share/zoneinfo + $_timezone_file = find_file('/etc/localtime') ? { + undef => "/usr/share/zoneinfo/${facts['timezone']}", + default => '/etc/localtime' + } + file { '/var/empty/sshd/etc/localtime': - source => 'file:///etc/localtime', + source => "file://${_timezone_file}", owner => 'root', group => 'root', mode => '0644', diff --git a/metadata.json b/metadata.json index fb948c3..587ca0f 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "simp-ssh", - "version": "6.17.0", + "version": "6.17.1", "author": "SIMP Team", "summary": "Manage ssh", "license": "Apache-2.0",