]> gitweb.fluxo.info Git - puppet-git.git/commitdiff
Expliciting dependency order
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Dec 2009 16:17:44 +0000 (14:17 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Dec 2009 16:17:44 +0000 (14:17 -0200)
manifests/git-daemon.pp
manifests/gitosis.pp
manifests/gitweb.pp

index bd3bc6834da4bff10a973bcad33db82744bf2f3a..fdb0007f66b7bc845d16311c6e5bd567dd0150a5 100644 (file)
@@ -10,8 +10,8 @@ class git-daemon inherits gitosis {
 
   # git-daemon config in inetd
   line { "git-daemon-inetd":
-    file => "/etc/inetd.conf",
-    line => "git stream tcp nowait gitosis /usr/bin/git git daemon --inetd --verbose --base-path=/var/git/repositories /var/git/repositories",
+    file   => "/etc/inetd.conf",
+    line   => "git stream tcp nowait gitosis /usr/bin/git git daemon --inetd --verbose --base-path=/var/git/repositories /var/git/repositories",
     ensure => present,
   }
 }
index d09e11d6931509d22c0a85dad53da464c3005bf1..2cf19ab8e83d62dac2f6071d747f6a06e47266c5 100644 (file)
@@ -7,17 +7,24 @@ class gitosis inherits git {
     ensure => directory,
     mode   => 0755,
     owner  => gitosis,
-    group  => gitosis;
+    group  => gitosis,
   }
 
   # symbolic link
   file { "/var/cache/git":
     ensure => "/var/git/repositories",
-    force => true,
+    force  => true,
   }
 
   # the needed packages
-  package { "gitosis": ensure => installed; }
+  package { "gitosis": ensure => installed }
+
+  # ensures that the group exists
+  group { "gitosis":
+    ensure    => present,
+    allowdupe => false;
+    require   => Package["gitosis"],
+  }
 
   # alters the user's home dir
   user { "gitosis":
@@ -28,18 +35,13 @@ class gitosis inherits git {
     shell     => "/bin/sh",
     gid       => "gitosis",
     groups    => [ "puppet" ],
-    require   => Group["gitosis"];
-  }
-
-  # ensures that the group exists
-  group { "gitosis":
-    ensure => present,
-    allowdupe => false;
+    require   => Group["gitosis"],
   }
 
   # tries to get rid of ugly directory structure
   file { "/srv/gitosis":
-    ensure => absent,
-    force  => true;
+    ensure  => absent,
+    force   => true,
+    require => User["gitosis"],
   }
 }
index 93c338208db1eb69117c79e1486757ceb690c697..d9d1b173f32668d33d3f9e8f524c55f2f60a4da2 100644 (file)
@@ -2,13 +2,13 @@
 
 class gitweb inherits gitosis {
   # the needed packages
-  package { gitweb: ensure => installed; }
+  package { gitweb: ensure => installed }
 
   # gitweb config file
   file { "/etc/gitweb.conf":
-    owner  => "root",
-    group  => "root",
-    mode   => 0644,
+    owner   => "root",
+    group   => "root",
+    mode    => 0644,
     ensure  => present,
     content => template('git/gitweb.conf.erb'),
   }