[COOK-3766] Directly use node attributes in templates where possible

https://tickets.opscode.com/browse/COOK-3766

This fixes an issue (and future potential issues) where users make a single change to an attribute that is passed to a template. In this case, the `ports.conf.erb` template was rendered by multiple recipes, but a Pull Request only added a required template variable to one of the many declarations where this template was generated by other recipes. This isn't something that will show up in a git diff, and it's also not something that tests can easily test. Therefore, the best solution is to move these quasi-calculated attributes out of the recipes and directly into the template itself.