Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

COOK-349, select URL with attributes

  • Loading branch information...
commit da3a5210c0bbaa7cfe343a092448a47bb0daedfc 1 parent b3f8271
Joshua Timberman authored January 29, 2011
24  ubuntu/attributes/default.rb
... ...
@@ -0,0 +1,24 @@
  1
+#
  2
+# Cookbook Name:: ubuntu
  3
+# Attribute File:: default
  4
+#
  5
+# Copyright 2011, Opscode, Inc.
  6
+#
  7
+# Licensed under the Apache License, Version 2.0 (the "License");
  8
+# you may not use this file except in compliance with the License.
  9
+# You may obtain a copy of the License at
  10
+#
  11
+#     http://www.apache.org/licenses/LICENSE-2.0
  12
+#
  13
+# Unless required by applicable law or agreed to in writing, software
  14
+# distributed under the License is distributed on an "AS IS" BASIS,
  15
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16
+# See the License for the specific language governing permissions and
  17
+# limitations under the License.
  18
+#
  19
+
  20
+case platform
  21
+when "ubuntu"
  22
+  set[:ubuntu][:archive_url]  = "http://us.archive.ubuntu.com/ubuntu"
  23
+  set[:ubuntu][:security_url] = "http://security.ubuntu.com/ubuntu"
  24
+end
4  ubuntu/metadata.json
@@ -20,7 +20,7 @@
20 20
       ]
21 21
     },
22 22
     "license": "Apache 2.0",
23  
-    "version": "0.8.1",
  23
+    "version": "0.99.0",
24 24
     "providing": {
25 25
     },
26 26
     "recipes": {
@@ -33,4 +33,4 @@
33 33
     "groupings": {
34 34
     },
35 35
     "long_description": ""
36  
-  }
  36
+  }
2  ubuntu/metadata.rb
@@ -2,7 +2,7 @@
2 2
 maintainer_email  "cookbooks@opscode.com"
3 3
 license           "Apache 2.0"
4 4
 description       "Sets up sources for ubuntu"
5  
-version           "0.8.1"
  5
+version           "0.99.0"
6 6
 depends           "apt"
7 7
 supports          "ubuntu"
8 8
 recipe            "ubuntu", "Sets up sources for the node's ubuntu release"
12  ubuntu/templates/default/sources.list.erb
@@ -2,14 +2,14 @@
2 2
 # Ubuntu <%= @code_name %> - Generated by Chef
3 3
 #
4 4
 
5  
-deb http://us.archive.ubuntu.com/ubuntu <%= @code_name %> main restricted universe multiverse
6  
-deb-src http://us.archive.ubuntu.com/ubuntu <%= @code_name %> main restricted universe multiverse
  5
+deb <%= node['ubuntu']['archive_url'] %> <%= @code_name %> main restricted universe multiverse
  6
+deb-src <%= node['ubuntu']['archive_url'] %> <%= @code_name %> main restricted universe multiverse
7 7
 
8  
-deb http://us.archive.ubuntu.com/ubuntu <%= @code_name %>-updates main restricted universe multiverse
9  
-deb-src http://us.archive.ubuntu.com/ubuntu <%= @code_name %>-updates main restricted universe multiverse
  8
+deb <%= node['ubuntu']['archive_url'] %> <%= @code_name %>-updates main restricted universe multiverse
  9
+deb-src <%= node['ubuntu']['archive_url'] %> <%= @code_name %>-updates main restricted universe multiverse
10 10
 
11 11
 # 
12 12
 # Security updates 
13 13
 #
14  
-deb http://security.ubuntu.com/ubuntu <%= @code_name %>-security main restricted universe multiverse 
15  
-deb-src http://security.ubuntu.com/ubuntu <%= @code_name %>-security main restricted universe multiverse 
  14
+deb <%= node['ubuntu']['security_url'] %> <%= @code_name %>-security main restricted universe multiverse 
  15
+deb-src <%= node['ubuntu']['security_url'] %> <%= @code_name %>-security main restricted universe multiverse 

0 notes on commit da3a521

Please sign in to comment.
Something went wrong with that request. Please try again.