Created
December 16, 2015 13:56
-
-
Save hartfordfive/6f9aef937fe0ba8fe144 to your computer and use it in GitHub Desktop.
Force apt-get update at compile time in chef
This file contains hidden or 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
| 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