From fe558f6373a79aa127e1e37f06b79a46b657b524 Mon Sep 17 00:00:00 2001 From: Adam Locke Date: Fri, 5 Jun 2020 11:08:03 -0400 Subject: [PATCH] [DOCS] Clarifying env variable substitution (#57370) (#57737) * Clarifying environment variable substitution in the ES configuration YAML * Update code snippet * Remove extraneous quotes from string example * Incorporating review feedback --- docs/reference/setup/configuration.asciidoc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/reference/setup/configuration.asciidoc b/docs/reference/setup/configuration.asciidoc index 6c685be387a..5337522ade8 100644 --- a/docs/reference/setup/configuration.asciidoc +++ b/docs/reference/setup/configuration.asciidoc @@ -71,7 +71,7 @@ path.logs: /var/log/elasticsearch Environment variables referenced with the `${...}` notation within the configuration file will be replaced with the value of the environment -variable, for instance: +variable. For example: [source,yaml] -------------------------------------------------- @@ -79,6 +79,13 @@ node.name: ${HOSTNAME} network.host: ${ES_NETWORK_HOST} -------------------------------------------------- +Values for environment variables must be simple strings. Use a comma-separated string to provide values that Elasticsearch will parse as a list. For example, Elasticsearch will split the following string into a list of values for the `${HOSTNAME}` environment variable: + +[source,yaml] +---- +export HOSTNAME=“host1,host2" +---- + [discrete] [[cluster-setting-types]] === Cluster and node setting types @@ -88,7 +95,7 @@ Cluster and node settings can be categorized based on how they are configured: [[dynamic-cluster-setting]] Dynamic:: You can configure and update dynamic settings on a running cluster using the -<>. +<>. + You can also configure dynamic settings locally on an unstarted or shut down node using `elasticsearch.yml`.