How to use in Chef different attributes values for different nodes
You may use attributes precedence for that or a wrapper cookbook, I highly encourage you to take some time to check out https://learn.chef.io which cover those uses cases. 

This is a kind of antipattern, one shot configuration are not what Chef is for, but for this use case I'd go with a common cookbook doing what is needed and a wrapper cookbook defining the attributes and including the common recipe.

A typical wrapper cookbook would need a few files:


metadata.rb as another cookbook with a line depends 'common_cookbook'
attributes\default.rb with the values for this type of server, same syntax as in common_cookbook
recipes\default.rb with the line include_recipe 'common_cookbook'


This pattern is also known as role cookbooks, more details in this blog post