puppet: Tidy old golang directories.

This relies on behavior which is only in Puppet 5.5.1 and above, which
means it must be skipped on Ubuntu 18.04.
This commit is contained in:
Alex Vandiver 2021-11-17 11:21:53 -08:00 committed by Tim Abbott
parent 2fc4acdf81
commit 3c8d7e2598

View File

@ -18,4 +18,23 @@ class zulip::golang {
ensure => file,
require => Zulip::Sha256_tarball_to['golang'],
}
file { $dir:
ensure => directory,
require => Zulip::Sha256_tarball_to['golang'],
}
unless $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '18.04' {
# Puppet 5.5.0 and below make this always-noisy, as they spout out
# a notify line about tidying the managed directory above. Skip
# on Bionic, which has that old version; they'll get tidied upon
# upgrade to 20.04.
tidy { '/srv/zulip-golang-*':
path => '/srv/',
recurse => 1,
rmdirs => true,
matches => 'zulip-golang-*',
require => File[$dir],
}
}
}