It's not really enough to hint that there might be some risks here when the advice you've given is potentially very dangerous, leading to possible data loss, and is not at all correct either. There is never any need to detach-cluster on a brand-new node - the reference manual describes the proper steps perform in that case. Even if this were good advice, I still recommend you also link to the docs for the elasticsearch-node tool which describe the risks in extensive detail.
When I was setting up my first cluster using Ansible I set it just like in manual with docs open at second screen. I tried for three days. There always was different cluster ids on each node (got three of them). Why? Probably tasks were completed in similar or even same time. That was the one and only way to add new node.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.