box
box copied to clipboard
Feature: template keyword
This keyword would accept a source filename, target filename, and a map of parameters. The parameters would be included into a go or erb template (torn on this; go would be much simpler and erb would be more familiar to devops-y types) which would then be copied into the container.
example:
template "hosts.tmpl", "/etc/hosts", hosts: ["127.0.0.1 localhost"]
torn on this; go would be much simpler and erb would be more familiar to devops-y types
I know what you mean... there is Ego, but it's a kind of weird mix of both worlds. How about something like Mustache as a compromise for the start?
well mruby has erb already, it should just need to be activated. this is more of a power/simplicity argument.
Why not just use the standard library templates?
@Xe right; that was the other option I floated initially. erb templates would be a lot more powerful I think (and more familiar to people coming from a chef/puppet background) but go templates would be a lot simpler and easier to describe in documentation.
Either way if someone beats me to this with a patch they'll probably get what they want. :)