Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1 KB

template-resources.md

File metadata and controls

35 lines (28 loc) · 1 KB

Template Resources

Template resources are written in TOML and define a single template resource. Template resources are stored under the /etc/confd/conf.d directory by default.

Required

  • dest (string) - The target file.
  • keys (array of strings) - An array of keys.
  • src (string) - The relative path of a configuration template.

Optional

  • group (string) - The group name that should own the file.
  • mode (string) - The permission mode of the file.
  • owner (string) - The username that should own the file.
  • reload_cmd (string) - The command to reload config.
  • check_cmd (string) - The command to check config. Use {{.src}} to reference the rendered source template.
  • prefix (string) - The string to prefix to keys.

Example

[template]
src = "nginx.conf.tmpl"
dest = "/etc/nginx/nginx.conf"
owner = "root"
group = "root"
mode = "0644"
keys = [
  "/nginx",
]
check_cmd = "/usr/sbin/nginx -t -c {{.src}}"
reload_cmd = "/usr/sbin/service nginx restart"