Created
January 23, 2013 15:49
-
-
Save melwinm/4608450 to your computer and use it in GitHub Desktop.
execution order
This file contains 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
include_recipe "apt" | |
# remove default repository | |
if ::File.exists?("/etc/apt/sources.list") | |
Chef::Log.info "Removing /etc/apt/sources.list" | |
file "/etc/apt/sources.list" do | |
action :delete | |
end | |
end | |
file "/etc/apt/sources.list" do | |
action :nothing | |
end | |
# register "IPHH Mirror" | |
apt_repository "iphh-mirror" do | |
uri "http://debian.mirror.iphh.net/debian" | |
components ["stable","main"] | |
end | |
# register "Primäre Debian-Spiegel-Sites" Germany | |
apt_repository "debian.org_non-free" do | |
uri "http://ftp.de.debian.org/debian" | |
components ["stable", "main", "contrib", "non-free"] | |
end | |
apt_repository "debian.org_security" do | |
uri "http://security.debian.org/debian-security" | |
components ["stable/updates", "main", "contrib", "non-free"] | |
notifies :create, resources(:file => "/etc/apt/sources.list") | |
end | |
package "mysql-client" do | |
action :install | |
only_if {File.exists?("/etc/apt/sources.list")} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment