Skip to content

Instantly share code, notes, and snippets.

@melwinm
Created January 23, 2013 15:49
Show Gist options
  • Save melwinm/4608450 to your computer and use it in GitHub Desktop.
Save melwinm/4608450 to your computer and use it in GitHub Desktop.
execution order
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