소스 검색

Add call to apt-update after add-apt-repository in apt::ppa

Ben Godfrey 13 년 전
부모
커밋
420d537
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      manifests/ppa.pp

+ 9 - 4
manifests/ppa.pp

@@ -7,9 +7,14 @@ define apt::ppa(
 
     package { "python-software-properties": }
 
-	exec { "/usr/bin/add-apt-repository ${name}":
-		require => Package["python-software-properties"],
-		# TODO: unless => 'check'
-	}
+    exec { "apt-update":
+        command     => "/usr/bin/apt-get update",
+        refreshonly => true,
+    }
+
+    exec { "/usr/bin/add-apt-repository ${name}":
+        require => Package["python-software-properties"],
+        notify => Exec["apt-update"]
+    }
 }