mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	puppet: Fix puppet-apt bug with modern apt-key.
With modern apt-key, the fingerprints are displayed in the more fully written-out format with spaces, and so `apt-key add` was being run every time. This fixes some unnecessary work being done on each puppet run on Debian stretch. I would have preferred to not need to do this by upgrading to upstream, but see #7423 for notes on why that isn't going to work (basically they broke support for puppet older than 4).
This commit is contained in:
		@@ -58,7 +58,7 @@ define apt::key (
 | 
			
		||||
        exec { $digest:
 | 
			
		||||
          command   => $digest_command,
 | 
			
		||||
          path      => '/bin:/usr/bin',
 | 
			
		||||
          unless    => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'",
 | 
			
		||||
          unless    => "/usr/bin/apt-key list | sed 's| ||g' | /bin/grep '${trimmedkey}'",
 | 
			
		||||
          logoutput => 'on_failure',
 | 
			
		||||
          before    => Anchor["apt::key ${upkey} present"],
 | 
			
		||||
        }
 | 
			
		||||
@@ -76,7 +76,7 @@ define apt::key (
 | 
			
		||||
      exec { "apt::key ${upkey} absent":
 | 
			
		||||
        command   => "apt-key del '${upkey}'",
 | 
			
		||||
        path      => '/bin:/usr/bin',
 | 
			
		||||
        onlyif    => "apt-key list | grep '${trimmedkey}'",
 | 
			
		||||
        onlyif    => "apt-key list | sed 's| ||g' | grep '${trimmedkey}'",
 | 
			
		||||
        user      => 'root',
 | 
			
		||||
        group     => 'root',
 | 
			
		||||
        logoutput => 'on_failure',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user