Change to make the appname more direct

For me at least, the appname being set to a default of nil and being passed to the template is not working.  Even when I set an attribute of the appname, it is not being updated and passed correctly so that it is always nil for the template and then it sets a default appname.  My solution to this is to set the appname for each type of agent by using default attributes and then use the appname attribute directly in the template for the yaml configuration.  I think that this is slightly cleaner and works better for me.