Another option if you need to rename multiple files. Checks one of the resources to see if it is running.
ruby_block "Rename file" do block do ::Dir.glob("*/*.src").each {|i| File.rename(i, i.gsub(/(.*).src/,'\\1.dst'))}; end not_if {File.exists?("new_resource.dst")} end
kamal079
source share