Skip to content

Instantly share code, notes, and snippets.

@Simonx123
Forked from Callonski/Elasticsearch_yaml.sh
Created September 7, 2020 00:57
Show Gist options
  • Select an option

  • Save Simonx123/c2843bd8758e73db4f2906dd26ee12f6 to your computer and use it in GitHub Desktop.

Select an option

Save Simonx123/c2843bd8758e73db4f2906dd26ee12f6 to your computer and use it in GitHub Desktop.
####### APPEND TO ELASTICSEARCH CONFIGURATION FILE ########
echo "node.name: ${node_name}" >> /etc/elasticsearch/elasticsearch.yml
echo "network.host : 0.0.0.0" >> /etc/elasticsearch/elasticsearch.yml
echo "discovery.seed_hosts:" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_1}" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_2}" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_3}" >> /etc/elasticsearch/elasticsearch.yml
echo "cluster.name: elasticsearch" >> /etc/elasticsearch/elasticsearch.yml
echo "cluster.initial_master_nodes:" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${master_node}" >> /etc/elasticsearch/elasticsearch.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment