Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
シェフでファイルの名前を変更するにはどうすればよいですか?
シェフのドキュメントで見つけたのは次のとおりです。
ruby_block を使用し、内部で ::File.Rename(src,dst) を使用します。Chef フレームワークにはファイルの名前変更機能がありません (少なくとも 0.10.18 まではありませんでした)。
ほんの一例:
ruby_block "Rename file" do block do ::File.rename(new_resource.src,new_resource.dst) end end