Permalink
Browse files

Removed dependency on python-software-properties.

Also, factored out chris::lea::key.
  • Loading branch information...
1 parent 83ba694 commit 3fcbc04c51cafbae40c15a9dd8209537ce66710e @garthk committed Sep 10, 2012
Showing with 16 additions and 15 deletions.
  1. +8 −0 manifests/lea/key.pp
  2. +8 −15 manifests/lea/repo.pp
View
8 manifests/lea/key.pp
@@ -0,0 +1,8 @@
+class chris::lea::key {
+ $key = "C7917B12"
+ exec { 'apt-key chrislea':
+ path => "/bin:/usr/bin",
+ unless => "apt-key list | grep '${key}' | grep -v expired",
+ command => "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${key}",
+ }
+}
View
23 manifests/lea/repo.pp
@@ -1,22 +1,15 @@
-class chris::lea::python_software_properties {
- $package = "python-software-properties"
- package { $package:
- ensure => installed,
- }
-}
-
define chris::lea::repo() {
- include chris::lea::python_software_properties
- exec { "chrislea-repo-added-${name}" :
- command => "/usr/bin/add-apt-repository ppa:chris-lea/${name}",
- creates => "/etc/apt/sources.list.d/chris-lea-${name}-${lsbdistcodename}.list",
- require => Package[$chris::lea::python_software_properties::package],
+ include chris::lea::key
+ $aptsource = "/etc/apt/sources.list.d/chris-lea-${name}-${lsbdistcodename}.list"
+ file { $aptsource:
+ ensure => present,
+ content => "deb http://ppa.launchpad.net/chris-lea/${name}/ubuntu ${lsbdistcodename} main\n",
}
- exec { "chrislea-repo-ready-${name}" :
+ exec { "apt-get update chrislea ${name}":
command => "/usr/bin/apt-get update",
- require => Exec["chrislea-repo-added-${name}"],
- creates => "/var/lib/apt/lists/ppa.launchpad.net_chris-lea_${name}_ubuntu_dists_${lsbdistcodename}_Release",
+ require => [Exec['apt-key chrislea'], File[$aptsource]],
+ creates => "/var/lib/apt/lists/ppa.launchpad.net_chris-lea_${name}_ubuntu_dists_${lsbdistcodename}_main_binary-${architecture}_Packages",
timeout => 3600,
}
}

0 comments on commit 3fcbc04

Please sign in to comment.