Skip to content

Commit 5b4d85e

Browse files
authored
Merge pull request #973 from moritz-makandra/main
MODULES-10956 remove redundant code in provider apt_key
2 parents 836e8dd + 49fda9c commit 5b4d85e

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

lib/puppet/provider/apt_key/apt_key.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,7 @@ def tempfile(content)
177177
file
178178
end
179179

180-
# Update a key if it is expired
181-
def update_expired_key
182-
# Return without doing anything if refresh or expired is false
183-
return unless resource[:refresh] == true && resource[:expired] == true
184-
185-
# Execute command to update key
186-
command = []
187-
188-
unless resource[:source].nil? && resource[:content].nil?
189-
raise(_('an unexpected condition occurred while trying to add the key: %{_resource}') % { _resource: resource[:id] })
190-
end
191-
192-
# Breaking up the command like this is needed because it blows up
193-
# if --recv-keys isn't the last argument.
194-
command.push('adv', '--no-tty', '--keyserver', resource[:server])
195-
unless resource[:options].nil?
196-
command.push('--keyserver-options', resource[:options])
197-
end
198-
command.push('--recv-keys', resource[:id])
199-
end
200-
201180
def exists?
202-
update_expired_key
203181
# report expired keys as non-existing when refresh => true
204182
@property_hash[:ensure] == :present && !(resource[:refresh] && @property_hash[:expired])
205183
end

0 commit comments

Comments
 (0)