You know you don't need to specify the name variable because it's automatically filled in by the define.
So you only need the 'ensure' variable in there.

You can check the template.pp define for this.

https://github.com/electrical/puppet-elasticsearch/blob/master/manifests/template.pp