Support ability to add more than one PPA
authorScott McLeod <scott.mcleod@theice.com>
Mon, 18 Apr 2011 01:43:33 +0000 (21:43 -0400)
committerScott McLeod <scott.mcleod@theice.com>
Mon, 18 Apr 2011 01:43:33 +0000 (21:43 -0400)
manifests/init.pp
manifests/ppa.pp

index 7513983c785bd9c0579428a4031c7656cbede021..677523bcf267c0fb8a9d7725f877e8a313a3f1aa 100644 (file)
@@ -4,6 +4,8 @@ class apt {
        $root = '/etc/apt'
        $provider = '/usr/bin/apt-get'
 
+  package { "python-software-properties": }
+
        file { "sources.list":
                name => "${root}/sources.list",
                ensure => present,
index 2821051a9902d4d85e89791e85f2d69bdd781cac..9c277e9bd4534ec35d7859a17706e5a1616f2ec4 100644 (file)
@@ -3,18 +3,16 @@
 define apt::ppa(
 
 ) {
-       include apt
+    require apt
 
-    package { "python-software-properties": }
-
-    exec { "apt-update":
-        command     => "/usr/bin/apt-get update",
+    exec { "apt-update-${name}":
+        command     => "/usr/bin/aptitude update",
         refreshonly => true,
     }
 
-    exec { "/usr/bin/add-apt-repository ${name}":
-        require => Package["python-software-properties"],
-        notify => Exec["apt-update"]
+    exec { "add-apt-repository-${name}":
+        command => "/usr/bin/add-apt-repository ${name}",
+        notify  => Exec["apt-update-${name}"],
     }
 }