Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.