I am working on a custom bootstrap template, based on a sample template. I am looking at the example of getting the validation key from the workstation to the brand new server, and from what I can tell is the key path is specified in knife.rb in the variable validation_key. And in the bootstrap template it is echoed in with a <%= validation_key %>
Is this magic ruby stuff, is the validation_key path var processed in knife, and the contents are read into a different var when processing the template, and that is how a path is turned into a string containing the contents of the file at that path?
If I declare foo=/tmp/test.txt in knife.rb, can I access the contents of test.txt in my bootstrap template by using <%= foo %>?
FROM: https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb
(
cat <<'EOP'
<%= validation_key %>
EOP
) > /tmp/validation.pem