From 47e16a5d418e76e5cc6502e052b1845abb5be25e Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 17 Nov 2021 10:03:46 -0800 Subject: [PATCH] puppet: Tidy old smokescreen binaries. --- puppet/zulip/manifests/profile/smokescreen.pp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/puppet/zulip/manifests/profile/smokescreen.pp b/puppet/zulip/manifests/profile/smokescreen.pp index b990c2695a..b5236dc832 100644 --- a/puppet/zulip/manifests/profile/smokescreen.pp +++ b/puppet/zulip/manifests/profile/smokescreen.pp @@ -24,13 +24,28 @@ class zulip::profile::smokescreen { creates => $bin, require => [File[$zulip::golang::bin], File[$dir]], } - + file { $bin: + ensure => file, + require => Exec['compile smokescreen'], + } file { '/usr/local/bin/smokescreen': ensure => 'link', target => $bin, - require => Exec['compile smokescreen'], + require => File[$bin], notify => Service[supervisor], } + 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 file above. Skip + # on Bionic, which has that old version; they'll get tidied upon + # upgrade to 20.04. + tidy { '/usr/local/bin/smokescreen-*': + path => '/usr/local/bin', + recurse => 1, + matches => 'smokescreen-*', + require => [File[$bin], File['/usr/local/bin/smokescreen']], + } + } $listen_address = zulipconf('http_proxy', 'listen_address', '127.0.0.1') file { "${zulip::common::supervisor_conf_dir}/smokescreen.conf":