split out onionmaster into its own role
authorPeter Palfrader <peter@palfrader.org>
Thu, 12 Sep 2019 07:19:07 +0000 (09:19 +0200)
committerPeter Palfrader <peter@palfrader.org>
Thu, 12 Sep 2019 07:19:07 +0000 (09:19 +0200)
hieradata/nodes/dillon.debian.org.yaml
modules/roles/manifests/onion_master.pp [new file with mode: 0644]
modules/roles/manifests/static_master.pp

index 9801d22..355d918 100644 (file)
@@ -1,3 +1,4 @@
 classes:
   - roles::dsa_wiki_buildhost
   - roles::static_master
+  - roles::onion_master
diff --git a/modules/roles/manifests/onion_master.pp b/modules/roles/manifests/onion_master.pp
new file mode 100644 (file)
index 0000000..5ada1e8
--- /dev/null
@@ -0,0 +1,19 @@
+# onion.debian.org website build
+#
+class roles::onion_master {
+  file { '/srv/puppet.debian.org':
+    ensure => directory
+  }
+  file { '/srv/puppet.debian.org/puppet-facts':
+    ensure => directory
+  }
+  concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
+    notify  => Exec['rebuild-onion-website'],
+  }
+  Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>>
+
+  exec { 'rebuild-onion-website':
+    command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',
+    refreshonly => true,
+  }
+}
index 36de4b9..6a36ed3 100644 (file)
@@ -35,23 +35,4 @@ class roles::static_master {
     owner  => 'staticsync',
     group  => 'staticsync',
   }
-
-  # export some information for the onion.debian.org build
-  if $::hostname in [dillon] {
-    file { '/srv/puppet.debian.org':
-      ensure => directory
-    }
-    file { '/srv/puppet.debian.org/puppet-facts':
-      ensure => directory
-    }
-    concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
-      notify  => Exec['rebuild-onion-website'],
-    }
-    Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>>
-
-    exec { 'rebuild-onion-website':
-      command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',
-      refreshonly => true,
-    }
-  }
 }