Skip to content

Instantly share code, notes, and snippets.

@retr0h
Created July 4, 2012 06:28
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 retr0h/3045722 to your computer and use it in GitHub Desktop.
Save retr0h/3045722 to your computer and use it in GitHub Desktop.
wtf
execute "update-grub" do
### always set even when not_if doesn't run caller.
### will grab node.run_state from custom_chef handler.
### but always set to true, even if grub wasn't modified.
node.run_state['reboot'] = true
action :nothing
end
execute "enabling GRUB_CMDLINE_LINUX in grub" do
command "..."
notifies :run, resources(:execute => "update-grub")
not_if "grep ^GRUB_CMDLINE_LINUX= #{node['sol']['grub']['conf']}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment