This repository has been archived by the owner on Mar 8, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relocate the usage of the gitrepo::repo resource onto the machines wh…
…ere it's being used
- Loading branch information
R. Tyler Croy
committed
Aug 7, 2012
1 parent
af69bd0
commit 73b8a18
Showing
4 changed files
with
37 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
# create one Git repository | ||
define gitrepo::repo($description) { | ||
$gitrepo_dir = $gitrepo::gitrepo_dir | ||
|
||
exec { | ||
"create repository ${name}" : | ||
require => File[$gitrepo_dir], | ||
unless => "test -d ${gitrepo_dir}/${name}.git", | ||
path => ['/bin', '/usr/bin'], | ||
user => 'www-data', | ||
command => "git init --bare ${gitrepo_dir}/${name}.git"; | ||
} | ||
|
||
file { | ||
"${gitrepo_dir}/${name}.git/description": | ||
require => Exec["create repository ${name}"], | ||
content => $description; | ||
} | ||
} | ||
|
||
# vim: shiftwidth=2 expandtab tabstop=2 |