Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am not sure if there is a good way to manage git repos on server using puppet. Basically, if i was to do it via bash commands, it would be:

cd -gitdir-
git init --bare

I want to set everything up so that the team can push to the server. Thanks a lot!

Jason

share|improve this question
add comment

1 Answer

How about this?

Say you've got a variable $reponame, maybe inside a defined type if you want to manage multiple repos:

exec { "init_repo_$reponame":
    command => "/usr/bin/git init --bare /path/to/repos/$reponame",
    creates => "/path/to/repos/$reponame",
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.