diff options
author | Peter Fern <github@obfusc8.org> | 2013-12-04 18:58:46 +1100 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-12-20 10:06:44 -0800 |
commit | 09eb9c7b18ca3c7f26db53830b074ab19e426e37 (patch) | |
tree | 23cbae79bba7aaee74e316e2bad9d73edadeaa74 /lib/chef/resource/package.rb | |
parent | 5f1776bb8d1150d11556ad932992ea4e48f8af6e (diff) | |
download | chef-09eb9c7b18ca3c7f26db53830b074ab19e426e37.tar.gz |
CHEF-4849: Implement `#response_file_variables` in Package resource
Now that Chef properly supports a package `response_file` using
`Chef::Resource::Template`, the Package resource should implement the
`response_file_variables` method so that variables do not have to exist
as node attributes (eg - for seeding DB passwords for configuration
files generated by packages).
Diffstat (limited to 'lib/chef/resource/package.rb')
-rw-r--r-- | lib/chef/resource/package.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb index eaad3e2e58..f9fdd1ab59 100644 --- a/lib/chef/resource/package.rb +++ b/lib/chef/resource/package.rb @@ -36,6 +36,7 @@ class Chef @package_name = name @resource_name = :package @response_file = nil + @response_file_variables = Hash.new @source = nil @version = nil end @@ -64,6 +65,14 @@ class Chef ) end + def response_file_variables(arg=nil) + set_or_return( + :response_file_variables, + arg, + :kind_of => [ Hash ] + ) + end + def source(arg=nil) set_or_return( :source, |