Created
October 5, 2012 21:51
-
-
Save greenmoss/3842636 to your computer and use it in GitHub Desktop.
chef library variable fail
This file contains 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
class Chef | |
class Recipe | |
def lulz() | |
a_bare_var = nil | |
node[:a_node_attribute] = nil | |
ruby_block "doing_stuff" do | |
block do | |
a_bare_var = 'rotfl' | |
Chef::Log.info("inside, a_bare_var: #{a_bare_var.inspect}") | |
node[:a_node_attribute] = 'rotfl' | |
Chef::Log.info("inside, node[:a_node_attribute]: #{node[:a_node_attribute].ins | |
end | |
end | |
log("outside, a_bare_var: #{a_bare_var.inspect}"){ level :info } | |
log("outside, node[:a_node_attribute]: #{node[:a_node_attribute].inspect}"){ level : | |
node.delete('a_node_attribute') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Who stole my variable/attribute values?!