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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With