summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-09-25 10:42:08 -0700
committerGitHub <noreply@github.com>2018-09-25 10:42:08 -0700
commit3cd7fe638553e1c656ececcadfb03a50a4ac5d4c (patch)
treea7219b61d1aa7f26e05579f4dff6cfd1a2e40011
parent949776a740d494740bbd6904f62c8856fd47a87a (diff)
parent3069d547337c3f96c7e2c3ae0c3097ca031d9407 (diff)
downloadchef-3cd7fe638553e1c656ececcadfb03a50a4ac5d4c.tar.gz
Merge pull request #7666 from chef/delcare
Remove declare_resource usage in ohai_hint
-rw-r--r--lib/chef/resource/ohai_hint.rb8
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