If you write your own pure ruby code that modifies the system in LWRP, then you want to wrap this code with conversion. It does two things that protect the wrapped code so that it doesn't run in a why-run mode. And it automatically marks the resource as updated when it starts.
, , , ( ), .
- :
use_inline_resources
action :doit do
unless File.exist("/tmp/doit")
converge_by("creating /tmp/doit") do
FileUtils.touch("/tmp/doit")
end
end
end
, - , :
use_inline_resources
action :doit do
file "/tmp/doit"
end
, , , - , , .