Using template to generate yaml file