title: Chef overwrite default attributes of a cookbook
body: <p>The git cookbook has an error in the url that it uses to download the appropriate version. The url is set in the attributes file as a default attribute so I figured I could just overwrite the url with something static but it does not work.  Here is the code from the git cookbook:</p>
  
  <pre><code>case node['platform_family']
  when 'windows'
    default['git']['version'] = '2.8.1'
    if node['kernel']['machine'] == 'x86_64'
      default['git']['architecture'] = '64'
      default['git']['checksum'] = '5e5283990cc91d1e9bd0858f8411e7d0afb70ce26e23680252fb4869288c7cfb'
    else
      default['git']['architecture'] = '32'
  default['git']['checksum'] = '17418c2e507243b9c98db161e9e5e8041d958b93ce6078530569b8edaec6b8a4'
    end
    default['git']['url'] = 'https://github.com/git-for-windows/git/releases/download/v%{version}.windows.1/Git-%{version}-%{architecture}-bit.exe'
  </code></pre>
  
  <p>The cookbook is being included as a dependency in my metadata.rb file and used as a resource in my recipe. It is not part of the runlist. I've tried overwriting the url in my role file like so</p>
  
  <pre><code>"name": "web",
    "description": "Web Server Role.",
    "json_class": "Chef::Role",
    "default_attributes": {
      "chef_client": {
        "interval": 300,
        "splay": 60
      },
      "git": {
        "url": "a test string"
      }
    },...
  </code></pre>
  
  <p>That did not work, so I tried adding it to the attributes file of my recipe as a default value, and when that did not work, I tried the <code>override!</code> method which still did not work.</p>
  
  <p>I think the problem is due to the fact that the attribute does not exist when I have declared it, and it gets overwritten by the git recipe.</p>
  
  <p>I don't know how to get around that.</p>