diff options
author | Tim Smith <tsmith@chef.io> | 2018-09-20 10:58:31 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-09-20 10:58:31 -0700 |
commit | 3069d547337c3f96c7e2c3ae0c3097ca031d9407 (patch) | |
tree | 859f6d99e1aeeafaba04a979cabfd9095fd16120 | |
parent | c2d168e31a33c37299e25b24fa57851b97340a65 (diff) | |
download | chef-3069d547337c3f96c7e2c3ae0c3097ca031d9407.tar.gz |
Remove declare_resource usage in ohai_hintdelcare
These aren't necessary here and make it harder to read the resource.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/ohai_hint.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/resource/ohai_hint.rb b/lib/chef/resource/ohai_hint.rb index 483da05e0c..d1b538c70f 100644 --- a/lib/chef/resource/ohai_hint.rb +++ b/lib/chef/resource/ohai_hint.rb @@ -40,12 +40,12 @@ class Chef action :create do description "Create an Ohai hint file." - declare_resource(:directory, ::Ohai::Config.ohai.hints_path.first) do + directory ::Ohai::Config.ohai.hints_path.first do action :create recursive true end - declare_resource(:file, ohai_hint_file_path(new_resource.hint_name)) do + file ohai_hint_file_path(new_resource.hint_name) do action :create content format_content(new_resource.content) end @@ -54,12 +54,12 @@ class Chef action :delete do description "Delete an Ohai hint file." - declare_resource(:file, ohai_hint_file_path(new_resource.hint_name)) do + file ohai_hint_file_path(new_resource.hint_name) do action :delete notifies :reload, ohai[reload ohai post hint removal] end - declare_resource(:ohai, "reload ohai post hint removal") do + ohai "reload ohai post hint removal" do action :nothing end end |