Add roles for the dsa gitolite host and the dsa wiki buildhost
authorPeter Palfrader <peter@palfrader.org>
Sat, 7 Sep 2019 15:06:09 +0000 (17:06 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 7 Sep 2019 15:08:40 +0000 (17:08 +0200)
The gitolite host ssh triggers the buildhost.

modules/roles/manifests/dsa_gitolite.pp [new file with mode: 0644]
modules/roles/manifests/dsa_wiki_buildhost.pp [new file with mode: 0644]

diff --git a/modules/roles/manifests/dsa_gitolite.pp b/modules/roles/manifests/dsa_gitolite.pp
new file mode 100644 (file)
index 0000000..32c5d15
--- /dev/null
@@ -0,0 +1,15 @@
+# dsa's gitolite host
+class roles::dsa_gitolite {
+  # we push the dsa-wiki build host
+  #
+  $key = $facts['git_key']
+
+  if ($key) {
+    ssh::authorized_key_add { 'dsa_gitolite::dsa_wiki_buildhost':
+      target_user => 'dsa',
+      command     => '/srv/dsa.debian.org/bin/update',
+      key         => $facts['git_key'],
+      collect_tag => 'dsa_wiki_buildhost',
+    }
+  }
+}
diff --git a/modules/roles/manifests/dsa_wiki_buildhost.pp b/modules/roles/manifests/dsa_wiki_buildhost.pp
new file mode 100644 (file)
index 0000000..d741659
--- /dev/null
@@ -0,0 +1,7 @@
+# buildhost for dsa-wiki
+class roles::dsa_wiki_buildhost {
+  ssh::authorized_key_collect { 'dsa_wiki_buildhost':
+    target_user => 'dsa',
+    collect_tag => 'dsa_wiki_buildhost',
+  }
+}