Victor Pudeyev
Victor Pudeyev

Reputation: 4538

Check out a Git repository with chef?

I have a Git repository I would like to check out onto a server. Is there a Chef recipe that does that?

Upvotes: 20

Views: 21627

Answers (1)

Marc Paradise
Marc Paradise

Reputation: 1939

The git SCM resource is probably what you're looking for. Simple resource usage example:

git "/path/to/check/out/to" do
  repository "git://github.com/opscode/chef.git"
  reference "master"
  action :sync
end

Also see "revision" attribute if you want to grab a specific branch.

Upvotes: 43

Related Questions