Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Fix deprecations #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions recipes/package_repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
pkg_version = node['mongodb3']['version']
case node['platform_family']
when 'rhel', 'fedora'
pkg_version = "#{node['mongodb3']['version']}-1.el#{node.platform_version.to_i}" # ~FC019
pkg_version = "#{node['mongodb3']['version']}-1.el#{node['platform_version'].to_i}" # ~FC019
if node['platform'] == 'amazon'
pkg_version = "#{node['mongodb3']['version']}-1.amzn1" # ~FC019
end
Expand Down Expand Up @@ -53,34 +53,34 @@

# MongoDB package version to install
if node['mongodb3']['package']['version'].nil?
node.set['mongodb3']['package']['version'] = pkg_version
node.default['mongodb3']['package']['version'] = pkg_version
end

# MongoDB package repo url
if node['mongodb3']['package']['repo']['url'].nil?
node.set['mongodb3']['package']['repo']['url'] = pkg_repo
node.default['mongodb3']['package']['repo']['url'] = pkg_repo
end

# MongoDB repository name
if node['mongodb3']['package']['repo']['apt']['name'].nil?
node.set['mongodb3']['package']['repo']['apt']['name'] = pkg_major_version.to_s
node.default['mongodb3']['package']['repo']['apt']['name'] = pkg_major_version.to_s
end

# MongoDB apt keyserver and key
if node['mongodb3']['package']['repo']['apt']['keyserver'].nil?
node.set['mongodb3']['package']['repo']['apt']['keyserver'] = apt_repo_keyserver
node.default['mongodb3']['package']['repo']['apt']['keyserver'] = apt_repo_keyserver
end

if node['mongodb3']['package']['repo']['apt']['key'].nil?
if pkg_major_version >= 3.2
node.set['mongodb3']['package']['repo']['apt']['key'] = 'EA312927'
node.default['mongodb3']['package']['repo']['apt']['key'] = 'EA312927'
else
node.set['mongodb3']['package']['repo']['apt']['key'] = '7F0CEB10'
node.default['mongodb3']['package']['repo']['apt']['key'] = '7F0CEB10'
end
end

if node['mongodb3']['package']['repo']['apt']['components'].nil?
node.set['mongodb3']['package']['repo']['apt']['components'] = apt_repo_component
node.default['mongodb3']['package']['repo']['apt']['components'] = apt_repo_component
end

# Add the MongoDB Package repository
Expand Down