Skip to content

Commit

Permalink
closes sous-chefs#751 Provide additional package_name parameter for i…
Browse files Browse the repository at this point in the history
…nstall
  • Loading branch information
Ayowel committed Dec 20, 2020
1 parent 5f1f3a3 commit 4ae137b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/provider_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def install_repo_wrapper_action
new_resource.version = "#{new_resource.version}-1"
end

pkg_r = package 'elasticsearch' do
pkg_r = package new_resource.package_name do
options new_resource.package_options
version new_resource.version
action :nothing
Expand All @@ -82,7 +82,7 @@ def remove_repo_wrapper_action
end
end

pkg_r = package 'elasticsearch' do
pkg_r = package new_resource.package_name do
options new_resource.package_options
version new_resource.version
action :nothing
Expand Down
3 changes: 3 additions & 0 deletions libraries/resource_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class ElasticsearchCookbook::InstallResource < Chef::Resource::LWRPBase
# where to install?
attribute(:dir, kind_of: String, default: '/usr/share')

# package name to use when installing with package provider
attribute(:package_name, kind_of: String, default: 'elasticsearch')

# attributes used by the package-flavor provider
attribute(:package_options, kind_of: String)

Expand Down

0 comments on commit 4ae137b

Please sign in to comment.