Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal example for include_dir? #73

Closed
alexanderheckel opened this issue Apr 18, 2021 · 1 comment
Closed

Minimal example for include_dir? #73

alexanderheckel opened this issue Apr 18, 2021 · 1 comment

Comments

@alexanderheckel
Copy link

Hey guys,

could you please provide a full (working) minimal example for the include_dir config property? Below is my test setup but it does not work. As a result I expect a destination file (/tmp/test) simply containing the word FOO (without resolving any keys at the moment, just for testing include_dir).

root@0abf41c53fce:/# tree /etc/remco
/etc/remco
|-- config
|-- resource.d
|   `-- test
`-- templates
    `-- test.tmpl

2 directories, 3 files
root@0abf41c53fce:/# cat /etc/remco/config
log_level   = "debug"
log_format  = "text"

pid_file    = "/var/run/remco.pid"
include_dir = "/etc/remco/resource.d/"

[default_backends]
[default_backends.env]
  onetime  = true
  keys     = [""]

root@0abf41c53fce:/# cat /etc/remco/resource.d/test
name = "test"

[[template]]
  src   = "/etc/remco/templates/test.tmpl"
  dst   = "/tmp/test"

root@0abf41c53fce:/# cat /etc/remco/templates/test.tmpl
FOO
root@0abf41c53fce:/# remco -version
remco Version: 0.12.1
UTC Build Time: 2020-10-19-20:38:57
Git Commit Hash: 8d36e4f96f2cf49d9a7953079de025089a5ad2ab+CHANGES
Go Version: go1.15.2
Go OS/Arch: linux/amd64
root@0abf41c53fce:/# remco
[0000]  INFO /usr/local/bin/remco[1008]: creating pid file at "/var/run/remco.pid"
[0000] DEBUG /usr/local/bin/remco[1008]: removing pid file at "/var/run/remco.pid"
@alexanderheckel
Copy link
Author

OK, found the solution in config_test.go ... files in the directory specified by include_dir must have the suffix .toml otherwise they will be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant