Make staticsync a module and update references
[mirror/dsa-puppet.git] / modules / staticsync / manifests / static_master.pp
index 6a36ed3..17efe76 100644 (file)
@@ -3,36 +3,44 @@
 # 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
+class staticsync::static_master (
+) {
+  include staticsync::base
+  include staticsync::srvdir
 
   # masters need to talk to mirrors and sources and themselves
-  class { 'roles::static::ssh':
+  class { 'staticsync::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',
+    source => 'puppet:///modules/staticsync/static-master-run',
     mode   => '0555',
   }
   file { '/usr/local/bin/static-master-update-component':
-    source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
+    source => 'puppet:///modules/staticsync/static-master-update-component',
     mode   => '0555',
   }
   file { '/etc/static-clients.conf':
-    content => template('roles/static-mirroring/static-clients.conf.erb'),
+    content => template('staticsync/static-clients.conf.erb'),
   }
+#  concat { '/etc/static-clients.conf':
+#    ensure_newline => true,
+#    warn           => @(EOF),
+#    ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+#    | EOF
+#  }
+#  Concat::Fragment <<| tag == 'staticsync::static-mirrors-to-trigger' |>>
 
-  file { '/home/staticsync/static-master':
+  file { "/home/${staticsync::user}/static-master":
     ensure => link,
-    target => '/srv/static.debian.org',
+    target => $staticsync::basedir,
   }
-  file { '/srv/static.debian.org/master':
+  file { "${staticsync::basedir}/master":
     ensure => directory,
     mode   => '0755',
-    owner  => 'staticsync',
-    group  => 'staticsync',
+    owner  => $staticsync::user,
+    group  => $staticsync::user,
   }
 }