add a piuparts slave role
authorPeter Palfrader <peter@palfrader.org>
Sat, 25 Feb 2017 19:53:52 +0000 (20:53 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sat, 25 Feb 2017 19:53:52 +0000 (20:53 +0100)
hieradata/common.yaml
modules/roles/manifests/init.pp
modules/roles/manifests/piuparts_slave.pp [new file with mode: 0644]

index 89d7abc..dad21a5 100644 (file)
@@ -82,6 +82,9 @@ roles:
     - paradis.debian.org
   piuparts:
     - pejacevic.debian.org
+  piuparts_slave:
+    - piu-slave-bm-a.debian.org
+    - piu-slave-ubc-01.debian.org
   popcon:
     - pinel.debian.org
   pubsub:
index 592397c..d8118e4 100644 (file)
@@ -205,6 +205,9 @@ class roles {
        if has_role('piuparts') {
                include roles::piuparts
        }
+       if has_role('piuparts_slave') {
+               include roles::piuparts_slave
+       }
 
        if has_role('contributors') {
                include roles::contributors
diff --git a/modules/roles/manifests/piuparts_slave.pp b/modules/roles/manifests/piuparts_slave.pp
new file mode 100644 (file)
index 0000000..f414e4a
--- /dev/null
@@ -0,0 +1,19 @@
+class roles::piuparts-slave {
+       package { 'debian.org-piuparts-slave.debian.org': ensure => installed, }
+
+       file { [ '/srv/piuparts.debian.org', '/srv/piuparts.debian.org/home-slave']:
+               ensure  => directory,
+               mode    => '0755',
+               owner   => 'piupartss',
+               group   => 'piuparts',
+       }
+       file { '/home/piupartss':
+               ensure => link,
+               target => '/srv/piuparts.debian.org/home-slave',
+       }
+
+       file { '/etc/piuparts':
+               ensure => link,
+               target => '/srv/piuparts.debian.org/etc/piuparts',
+       }
+}