Hello,
I want to write a LWRP but some of the inline resources should allways run but not send notifications to other resources.
Here is a very basic example:
resource:
resource_name :test
property :content, String, default: “This is a Test”
action :run do
#This has to be run every time
ruby_block “Always run but do not set updated_by_last_action” do
block do
true
end
action :run
end
file "/tmp/test" do
action :create
content new_resource.content
user "root"
group "root"
end
end
Recipe:
test “My_Test” do
content node.environment
notifies :restart, ‘service[testservice]’, :delayed
end
#This should only be run if new_resource.content changed
service “testservice” do
action :nothing
end
I can’t figure out how to do it. Can somebody help me.
Kind Regards