Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/233713

Change subject: aptly: Setup client role
......................................................................

aptly: Setup client role

Defaults to $project-packages.$project.$site.wmflabs

Change-Id: I1bd076a48a1a37c47572fa43b0819712a4122abc
---
M manifests/role/aptly.pp
M modules/aptly/files/aptly.nginx.conf
A modules/aptly/manifests/client.pp
3 files changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/233713/1

diff --git a/manifests/role/aptly.pp b/manifests/role/aptly.pp
index 1f7edf3..1061d5d 100644
--- a/manifests/role/aptly.pp
+++ b/manifests/role/aptly.pp
@@ -4,3 +4,14 @@
 class role::aptly {
     include ::aptly
 }
+
+# = Class: role::aptly::client
+#
+# Sets up a simple deb package that points to the project's aptly server
+class role::aptly::client(
+    $server = "${labsproject}-packages.${labsproject}.${site}.wmflabs",
+) {
+    class { '::aptly::client':
+        server => $server,
+    }
+}
diff --git a/modules/aptly/files/aptly.nginx.conf 
b/modules/aptly/files/aptly.nginx.conf
index 842c5bc..fba3744 100644
--- a/modules/aptly/files/aptly.nginx.conf
+++ b/modules/aptly/files/aptly.nginx.conf
@@ -11,7 +11,7 @@
 server {
     listen 80;
 
-    location / {
+    location /repo {
         alias /srv/packages/public;
         autoindex on;
     }
diff --git a/modules/aptly/manifests/client.pp 
b/modules/aptly/manifests/client.pp
new file mode 100644
index 0000000..2c1b952
--- /dev/null
+++ b/modules/aptly/manifests/client.pp
@@ -0,0 +1,10 @@
+class aptly::client(
+    $servername,
+) {
+    apt::repository { 'project-aptly':
+        url        => "http://${servername}/repo";,
+        dist       => $::lsbdistcodename,
+        components => $::labsproject,,
+        source     => true,
+    }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/233713
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bd076a48a1a37c47572fa43b0819712a4122abc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to