summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-01-25 15:31:55 -0800
committerTim Smith <tsmith@chef.io>2018-02-13 13:25:20 +0000
commit5ace629861c424cdd61f086b96da284918f15a5a (patch)
tree2ff90b11d28a0e720d19e04e77b0cdead5d45d34
parent2e0f18c49eb1d5bfe531fe287c66e1e082ccfc5c (diff)
downloadchef-5ace629861c424cdd61f086b96da284918f15a5a.tar.gz
Make sure to use declare resource everywhere
Signed-off-by: Tim Smith <tsmith@chef.io>
-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 fc85b17c68..ac3ca63a46 100644
--- a/lib/chef/resource/ohai_hint.rb
+++ b/lib/chef/resource/ohai_hint.rb
@@ -28,24 +28,24 @@ class Chef
property :compile_time, [true, false], default: true
action :create do
- directory ::Ohai::Config.ohai.hints_path.first do
+ declare_resource(:directory, ::Ohai::Config.ohai.hints_path.first) do
action :create
recursive true
end
- file ohai_hint_file_path(new_resource.hint_name) do
+ declare_resource(:file, ohai_hint_file_path(new_resource.hint_name)) do
action :create
content format_content(new_resource.content)
end
end
action :delete do
- file ohai_hint_file_path(new_resource.hint_name) do
+ declare_resource(:file, ohai_hint_file_path(new_resource.hint_name)) do
action :delete
notifies :reload, ohai[reload ohai post hint removal]
end
- ohai "reload ohai post hint removal" do
+ declare_resource(:ohai, "reload ohai post hint removal") do
action :nothing
end
end