Текущий код рецепта шеф-повара
ruby_block 'replace_line' do
block do
file = Chef::Util::FileEdit.new(common_conf)
file.search_file_replace_line(/fs.type.*/, 'fs.type='+fs_type)
file.write_file
end
only_if { File.exist?(common_conf) }
end
Я получаю следующее предупреждение:
Running handlers complete
[0m[2017-09-01T03:22:36-05:00] INFO: Report handlers complete
Deprecated features used!
Cloning resource attributes for ruby_block[replace_line] from prior resource
[0mPrevious ruby_block[replace_line]: /var/chef/cache/cookbooks/spark_deployer/recipes/execution_component.rb:61:in `from_file'
[0mCurrent ruby_block[replace_line]: /var/chef/cache/cookbooks/spark_deployer/recipes/execution_component.rb:70:in `from_file' at 1 location:[0m
- /var/chef/cache/cookbooks/spark_deployer/recipes/execution_component.rb:70:in `from_file'[0m
See https://docs.chef.io/deprecations_resource_cloning.html for further details
Может ли кто-нибудь помочь мне написать приведенный выше код лучше?