new role module generation from template, and use HEREOC instead of quoted string