We should remove the cluster.initial_master_nodes after the first cluster initialize otherwise the node will lose data after the first restart. With if condition in the template elasticsearch.yml should we evaluate the cluster status, if it is already built, then do not set cluster.initial_master_nodes in the elasticsearch.yml file.
The roll out of the template should occur two times. One time before the first start of the cluster with notify on the task, because it will be the major config roll out. The first time after the Cluster initialize without notify on the task to not restart all cluster nodes at once. In the future, a restart will take place for any reason and Elasticsearch will read his configuration again.
We should either wait for #136 to be merged before starting with this or integrate the change in this PR. Before the merge we can't tell which nodes are masters and which aren't, but after the merge we know.
We should remove the cluster.initial_master_nodes after the first cluster initialize otherwise the node will lose data after the first restart. With if condition in the template elasticsearch.yml should we evaluate the cluster status, if it is already built, then do not set cluster.initial_master_nodes in the elasticsearch.yml file.
The roll out of the template should occur two times. One time before the first start of the cluster with notify on the task, because it will be the major config roll out. The first time after the Cluster initialize without notify on the task to not restart all cluster nodes at once. In the future, a restart will take place for any reason and Elasticsearch will read his configuration again.