Files
nomad/website/content/docs/commands/config/validate.mdx
Aimee Ukasick dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00

52 lines
1.4 KiB
Plaintext

---
layout: docs
page_title: 'nomad config validate command reference'
description: |
The `nomad config validate` command validates Nomad configuration files so you can test Nomad configuration without starting the agent.
---
# `nomad config validate` command reference
The `config validate` command performs validation on a set of Nomad
configuration files. This is useful to test the Nomad configuration
without starting the agent.
## Usage
```plaintext
nomad config validate <config_path> [<config_path...>]
```
The `config validate` command requires a path to either a single
configuration file or a directory of configuration files to use for
configuring the Nomad agent. This option can be specified multiple
times. If multiple config files are passed, the values from each will
be merged together. During merging, values from files found later in
the list are merged over values from previously parsed files.
This command cannot operate on partial configuration fragments since
those won't pass the full agent validation. This command does not
require an ACL token.
Returns 0 if the configuration is valid, or 1 if there are problems.
## General options
@include 'general_options.mdx'
## Examples
Validate a configuration file:
```shell-session
$ nomad config validate ./nomad.hcl
Configuration is valid!
```
Validate a directory of configuration files:
```shell-session
$ nomad config validate /etc/nomad.d
Configuration is valid!
```