Last active
December 19, 2015 06:29
-
-
Save claco/5912133 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Attributes | |
default["some"]["thing"] = "foop" | |
# Recipe | |
# This prints the value | |
Chef::Log.warn node["some"]["thing"] | |
template "farp" do | |
source "farp.erb" | |
variables( | |
:farp => node["some"]["thing"] | |
) | |
end | |
# Template Erb | |
<%= @farp %> # This is nil/blank in the template erb output | |
----------------- | |
# this works | |
# Recipe | |
template "farp" do | |
source "farp.erb" | |
end | |
# Template Erb | |
<%= node["some"]["thing"] %> # This prints the value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment