Frage

I used the following chef stanza to try and checkout a github repository:

   git "/home/ubuntu" do
     repository "git://github.com/kmerenkov/brukva.git"
     revision "master"
     action :checkout
     user "ubuntu"
   end

The chef run has no errors and the resource is shown as up to date (even though no files are in the target directory).

* git[/home/ubuntu] action checkout (up to date)

What am I doing wrong?

War es hilfreich?

Lösung

Try:

git "/home/ubuntu/brukva" do
  repository "git://github.com/kmerenkov/brukva.git"
  revision "master"
  action :sync
  user "ubuntu"
end

It does nothing if your target directory exists when using :checkout because it assumes your checkout is done already, you can see chef tells "up to date".

Refer to the source of git provider

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top