only_if "/usr/bin/apt-key adv --list-keys #{new_resource.key} | fgrep expired"
end
- execute "apt-key-#{new_resource.key}-install" do
- command "/usr/bin/apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys #{new_resource.key}"
- not_if "/usr/bin/apt-key adv --list-keys #{new_resource.key}"
+ if new_resource.key_url
+ execute "apt-key-#{new_resource.key}-install" do
+ command "/usr/bin/apt-key adv --fetch-keys #{new_resource.key_url}"
+ not_if "/usr/bin/apt-key adv --list-keys #{new_resource.key}"
+ end
+ else
+ execute "apt-key-#{new_resource.key}-install" do
+ command "/usr/bin/apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys #{new_resource.key}"
+ not_if "/usr/bin/apt-key adv --list-keys #{new_resource.key}"
+ end
end
end
#
package "apt"
+package "gnupg-curl"
package "update-notifier-common"
file "/etc/motd.tail" do
apt_source "management-component-pack" do
template "hp.list.erb"
url "http://downloads.linux.hpe.com/SDR/repo/mcp"
- key "B1275EA3"
+ key "26C2B797"
+ key_url "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub"
end
apt_source "hwraid" do
attribute :template, :kind_of => String, :default => "default.list.erb"
attribute :url, :kind_of => String, :required => true
attribute :key, :kind_of => String
+attribute :key_url, :kind_of => String
def initialize(name, run_context = nil)
super(name, run_context)