Update openssl cookbook

This commit is contained in:
Greg Karékinian
2017-04-07 18:19:28 +02:00
parent d5d3fb60c1
commit d49f28574c
20 changed files with 398 additions and 375 deletions

View File

@@ -2,7 +2,7 @@
# Cookbook Name:: openssl
# Recipe:: default
#
# Copyright 2009, Chef Software, Inc.
# Copyright 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -1,8 +1,8 @@
#
# Cookbook Name:: openssl
# Cookbook:: openssl
# Recipe:: upgrade
#
# Copyright 2015, Chef Software, Inc. <legal@chef.io>
# Copyright:: 2015-2017, Chef Software, Inc. <legal@chef.io>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,22 +16,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'chef-sugar'
# Attributes are set here and not in attributes/default.rb because of the
# chef-sugar dependency for the methods evaluated in the case statement.
case
when debian_before_or_at_squeeze?, ubuntu_before_or_at_lucid?
node.default['openssl']['packages'] = %w(libssl0.9.8 openssl)
when debian_after_or_at_wheezy?, ubuntu_after_or_at_precise?
node.default['openssl']['packages'] = %w(libssl1.0.0 openssl)
when rhel?
node.default['openssl']['packages'] = %w(openssl)
case node['platform_family']
when 'debian', 'ubuntu'
packages = %w(libssl1.0.0 openssl)
when 'rhel', 'fedora', 'suse'
packages = %w(openssl)
else
node.default['openssl']['packages'] = []
packages = []
end
node['openssl']['packages'].each do |ssl_pkg|
packages.each do |ssl_pkg|
package ssl_pkg do
action :upgrade
node['openssl']['restart_services'].each do |ssl_svc|