From 5682eb9097428c1738156d72223b696e914eaa40 Mon Sep 17 00:00:00 2001 From: Chris Baker Date: Fri, 16 Nov 2018 14:28:36 +0000 Subject: [PATCH] config docs: added explicit clarification, that lexicographical ordering is with respect to files in the specified folder --- website/source/docs/configuration/index.html.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/website/source/docs/configuration/index.html.md b/website/source/docs/configuration/index.html.md index ef5a4dadb..73ef36703 100644 --- a/website/source/docs/configuration/index.html.md +++ b/website/source/docs/configuration/index.html.md @@ -16,15 +16,18 @@ files or directories to configure the Nomad agent. ## Load Order and Merging The Nomad agent supports multiple configuration files, which can be provided -using the `-config` CLI flag. The flag can accept either a file or folder: +using the `-config` CLI flag. The flag can accept either a file or folder. In +the case of a folder, any `.hcl` and `.json` files in the folder will be loaded +and merged in lexicographical order. Directories are not loaded recursively. + +For example: ```shell $ nomad agent -config=server.conf -config=/etc/nomad -config=extra.json ``` This will load configuration from `server.conf`, from `.hcl` and `.json` files -under `/etc/nomad`, and finally from `extra.json`. Files are loaded and merged -in lexicographical order. Directories are not loaded recursively. +under `/etc/nomad`, and finally from `extra.json`. As each file is processed, its contents are merged into the existing configuration. When merging, any non-empty values from the latest config file