move things from modules/roles/static* to modules/static*
[mirror/dsa-puppet.git] / modules / staticsync / manifests / static_master.pp
diff --git a/modules/staticsync/manifests/static_master.pp b/modules/staticsync/manifests/static_master.pp
new file mode 100644 (file)
index 0000000..6a36ed3
--- /dev/null
@@ -0,0 +1,38 @@
+# static master
+#
+# each component defines exactly one static master.  Content is copied from the source host
+# to the master, and from there to all the mirrors.
+#
+class roles::static_master {
+  include roles::static::base
+  include roles::static::srvdir
+
+  # masters need to talk to mirrors and sources and themselves
+  class { 'roles::static::ssh':
+    add_tag     => [ 'staticsync-mirror', 'staticsync-source', 'staticsync-master' ],
+    collect_tag => 'staticsync-master',
+  }
+
+  file { '/usr/local/bin/static-master-run':
+    source => 'puppet:///modules/roles/static-mirroring/static-master-run',
+    mode   => '0555',
+  }
+  file { '/usr/local/bin/static-master-update-component':
+    source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
+    mode   => '0555',
+  }
+  file { '/etc/static-clients.conf':
+    content => template('roles/static-mirroring/static-clients.conf.erb'),
+  }
+
+  file { '/home/staticsync/static-master':
+    ensure => link,
+    target => '/srv/static.debian.org',
+  }
+  file { '/srv/static.debian.org/master':
+    ensure => directory,
+    mode   => '0755',
+    owner  => 'staticsync',
+    group  => 'staticsync',
+  }
+}