Fixed template issues

Hey,

Your previous code was not working on chef 11.12 we have amended the code to work. Please check if you can merge the code. 

Regards
Adham