Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new install method 'none' that doesn't install. #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
default[:mongodb][:default_init_name] = 'mongodb'
default[:mongodb][:instance_name] = 'mongodb'

# this option can be "distro" or "mongodb-org"
# this option can be "distro", "mongodb-org" or "none"
default[:mongodb][:install_method] = 'distro'

default[:mongodb][:is_replicaset] = nil
Expand Down
36 changes: 19 additions & 17 deletions recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,26 @@
end
end

case node['platform_family']
when 'debian'
# this options lets us bypass complaint of pre-existing init file
# necessary until upstream fixes ENABLE_MONGOD/DB flag
packager_opts = '-o Dpkg::Options::="--force-confold" --force-yes'
when 'rhel'
# Add --nogpgcheck option when package is signed
# see: https://jira.mongodb.org/browse/SERVER-8770
packager_opts = '--nogpgcheck'
else
packager_opts = ''
end
if node['mongodb']['install_method'] != 'none'
case node['platform_family']
when 'debian'
# this options lets us bypass complaint of pre-existing init file
# necessary until upstream fixes ENABLE_MONGOD/DB flag
packager_opts = '-o Dpkg::Options::="--force-confold" --force-yes'
when 'rhel'
# Add --nogpgcheck option when package is signed
# see: https://jira.mongodb.org/browse/SERVER-8770
packager_opts = '--nogpgcheck'
else
packager_opts = ''
end

# install
package node[:mongodb][:package_name] do
options packager_opts
action :install
version node[:mongodb][:package_version]
# install
package node[:mongodb][:package_name] do
options packager_opts
action :install
version node[:mongodb][:package_version]
end
end

# Create keyFile if specified
Expand Down