Skip to content

Instantly share code, notes, and snippets.

@scarolan
Created September 10, 2014 18:23
Show Gist options
  • Save scarolan/247ebff761aa4b10cb6f to your computer and use it in GitHub Desktop.
Save scarolan/247ebff761aa4b10cb6f to your computer and use it in GitHub Desktop.
ruby_block "randomly_choose_language" do
block do
if Random.rand > 0.5
node.run_state['scripting_language'] = 'php'
else
node.run_state['scripting_language'] = 'perl'
end
end
end
package "scripting_language" do
package_name lazy { node.run_state['scripting_language'] }
action :install
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment