是否可以使用厨师食谱来维护文件中的特定行?
示例: fileA.txt
foo
foofoofoo
This is important content
This is important content
fooo
foofoofoof
foooooofoofofofof在上面的例子中,我有一个名为fileA.txt的名字,它有两个重要的行,它们对我来说非常重要。如果有人只更改了文件中的这2行。下一轮主厨-客户端将其恢复到相同的状态。
但是,如果有人改变了其他不重要的行,它就不会回来了。
file '/tmp/fileA.txt' do
content 'foo
foofoofoo
This is important content
This is important content
fooo
foofoofoo
foooooofoofofofof'
action :create
end上面的代码还会还原回我不想要的其他行。有解决办法吗?
发布于 2018-06-21 14:02:45
https://stackoverflow.com/questions/50967745
复制相似问题