Skip to content

Instantly share code, notes, and snippets.

@leifmadsen
Created March 27, 2013 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leifmadsen/5250700 to your computer and use it in GitHub Desktop.
Save leifmadsen/5250700 to your computer and use it in GitHub Desktop.
ruby_block "Get starting values" do
block do
record = File.open("#{Chef::Config[:file_cache_path]}/#{db}-status.txt") {|f| f.readline}
node.set['mysql']['file_value'] = record.split("\t").first
node.set['mysql']['pos_value'] = record.split("\t")[1]
Chef::Log.info("Current values for file_value and pos_value are: #{node['mysql']['file_value']} and #{node['mysql']['pos_v#
end
action :create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment