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:
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
file "/tmp/test" do action :create content new_resource.content user "root" group "root" end
test “My_Test” do
notifies :restart, ‘service[testservice]’, :delayed
#This should only be run if new_resource.content changed
service “testservice” do
I can’t figure out how to do it. Can somebody help me.