Closed njegosrailic closed 3 years ago
Hey @njegosrailic, sorry that the docs are unclear on this point but -once
is a command line only option, it has no corresponding config option.
Hey @eikenb, thanks for the answer.
Even when the issue itself is small, I wonder why this ticket is not at least kept open. The docs contain a very clear statements, the mode can be set via configuration file. As this is not the case this is more than just "unclear" docs - this inconsistency between docs and functionality is an open issue.
Once Mode Configure Consul Template to execute each template exactly once and exits with the flag
-once
or in the configuration file. once = true
To run in Once mode, include the
-once
flag or enable in the configuration file (links to above)
After some debugging and code inspection I understand, that a fix will not be that easy: It seems the used algorithm to render the final configuration would need some rework. At minimum for bool options the default value gets a higher prio during merge of configuration than the bool value set in a configuration file.
I will try, if I can strengthen this algorithm a bit and provide a merge request.
Seems like it ignores "Once" parameter from the config file. Tried to pass
-once=true
as a cmd parameter and it's working as expected.Not sure did I miss something, but it parses out successfully all other params from the config file.
Consul Template version
Command
Configuration
Debug output
Expected behavior
Actual behavior