/consul-conf

Regenerate configuration files based on node and service status from the Consul API.

Primary LanguageRuby

Config Options

Required

template
the ERB template to use to generate new configurations
outfile
the destination - the config file to rewrite

Optional

comment_regex
A regular expression ( passed to `Regexp.new`) to pull comments out of the template ( so that comments are not included in the diff when checking for updates). You might consider using `"^\\s*#"` for files with hashed comment lines.
Note: be sure to escape backslashes!
postupdate
A command to run after updating the config file ( eg restarting a service )
postupdate_status
An 8-bit integer status code to expect from the postupdate command, only considered if the `postupdate` option is specified.