docs: def index_template_create(name, body=None, hosts=None, profile=None, source=None):
      '''
      Create an index template
  
      name
          Index template name
  
      body
          Template definition as specified in http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
  
      source
          URL to file specifying template definition. Cannot be used in combination with ``body``.
  
      CLI example::
  
          salt myminion elasticsearch.index_template_create testindex_templ '{ "template": "logstash-*", "order": 1, "settings": { "number_of_shards": 1 } }'
      '''
      es = _get_instance(hosts, profile)
      if source and body:
          message = 'Either body or source should be specified but not both.'
          raise SaltInvocationError(message)
      if source:
          body = __salt__['cp.get_file_str'](
                    source,
                    saltenv=__opts__.get('saltenv', 'base'))
      try:
          result = es.indices.put_template(name=name, body=body)
          return result.get('acknowledged', False)
      except elasticsearch.TransportError as e:
          raise CommandExecutionError("Cannot create template {0}, server returned code {1} with message {2}".format(name, e.status_code, e.error))