The error appears to be in your template, not your cookbook. In fact, it appears completely unrelated to the files you posted. I'd need to see the #{env_name}_config.conf.erb file and the build_admin.rb file in order to be more help than that.
def load_current_resource @current_resource = Chef::Resource::Foo.new @new_resource.name @current_resource.name = @new_resource.name end Your problem is here, name is supposed to be invariable (for current and new resource to match) as it identify the resource, you should not try to set @current_resource.name. Remove this line and it should be ok without the accessor....
A LWRP consists of two files, a "resource" (declaration) and "provider" (implementation): https://github.com/chef-cookbooks/yum/blob/master/resources/repository.rb https://github.com/chef-cookbooks/yum/blob/master/providers/repository.rb ...
It would appear that the default value is passed to each new resource, but not cloned for each new resource. As a result, the array (not it's contents) is the default value. If you add things to this array, it would be expected that each provider using the default attribute...
It happens becuase Chef already has a file resource. We have to use the Ruby File class in a recipe.We use ::File to use the Ruby File class to fix this issue. For example: execute 'apt-get-update' do command 'apt-get update' ignore_failure true only_if { apt_installed? } not_if { ::File.exist?('/var/lib/apt/periodic/update-success-stamp') }...