From 16bac72ec736c403cc59f1388bd067cf2f214bb1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 6 Dec 2009 14:17:44 -0200 Subject: Expliciting dependency order --- manifests/git-daemon.pp | 4 ++-- manifests/gitosis.pp | 26 ++++++++++++++------------ manifests/gitweb.pp | 8 ++++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/manifests/git-daemon.pp b/manifests/git-daemon.pp index bd3bc68..fdb0007 100644 --- a/manifests/git-daemon.pp +++ b/manifests/git-daemon.pp @@ -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, } } diff --git a/manifests/gitosis.pp b/manifests/gitosis.pp index d09e11d..2cf19ab 100644 --- a/manifests/gitosis.pp +++ b/manifests/gitosis.pp @@ -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"], } } diff --git a/manifests/gitweb.pp b/manifests/gitweb.pp index 93c3382..d9d1b17 100644 --- a/manifests/gitweb.pp +++ b/manifests/gitweb.pp @@ -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'), } -- cgit v1.2.3