Writing configuration files
Sections
Puppet supports two formats for configuration files that configure settings: valid JSON and Human-Optimized Config Object Notation (HOCON), a JSON superset.
For more information about HOCON itself, see the HOCON documentation.
Configuration file syntax
Refer to these examples when you're writing configuration files to identify correct JSON or HOCON syntax.
Brackets
In HOCON, you can omit the brackets ( { }
) around a root object.
JSON example | HOCON example |
---|---|
|
|
Quotes
In HOCON, double quotes around key and value strings are optional in most cases.
However, double quotes are required if the string contains the
characters *
, ^
, +
, :
,
or =
.
JSON example | HOCON example |
---|---|
|
|
Commas
JSON example | HOCON example | |
---|---|---|
Map |
|
|
Array |
|
|
Comments
//
or #
. Inline comments
are supported. HOCON example |
---|
|