Skip to content

Instantly share code, notes, and snippets.

@hartfordfive
Created December 16, 2015 13:56
Show Gist options
  • Select an option

  • Save hartfordfive/6f9aef937fe0ba8fe144 to your computer and use it in GitHub Desktop.

Select an option

Save hartfordfive/6f9aef937fe0ba8fe144 to your computer and use it in GitHub Desktop.
Force apt-get update at compile time in chef
execute "fix apt-cache" do
command 'apt-get update'
only_if do
acp = Mixlib::ShellOut.new('apt-cache policy autoconf')
acp.run_command
acp.error?
end
end.run_action( :run )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment