I have a problem during migration of chef-client 12 to chef-client 14 and seems that the old way to load Providers is different in chef14
Chef::Provider::DeployKeyGithub cannot be load
deploy_key deploy_key_name do
provider Chef::Provider::DeployKeyGithub
path "/home/#{current_user}/.ssh"
credentials({
:token => File.read('/root/someid').strip
})
repo 'test/test_config'
owner 'root'
group 'root'
mode '0400'
action :add
end
Error:
================================================================================
NameError
---------
uninitialized constant Chef::Provider::DeployKeyGithub
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/flume_wrapper/recipes/default.rb:89:in `block in from_file'
/var/chef/cache/cookbooks/flume_wrapper/recipes/default.rb:88:in `from_file'```
Does anyone knows how is the new way to load a Provider in a recipe for chef14 client?
Chef::ProviderResolver.new(node, find_resource!("deploy_key[github]"), :nothing).resolve– Carlos Catari Jan 30 '19 at 19:38