I'm trying to use the vcsrepo module to check out an SVN repo. Heres the pp code I'm using:
package { $repo_package:
ensure => installed,
}
vcsrepo { "${doc_root}${fqdn}/src":
ensure => present,
provider => $repo_provider, #svn
source => $repository, #svn+ssh://remoterepo.com/path/to/trunk
user => $deploy_user,
owner => 'www-data',
group => 'www-data',
require => [ File["/home/${deploy_user}/.ssh/${deploy_private_key}"], Package["${repo_package}"] ], #making sure ssh key is there and that svn is installed
}
And when I run it, I get this error:
Error: /Vcsrepo[/checkout/destination/path]: Could not evaluate:
Execution of '/usr/bin/svnlook uuid /checkout/destination/path'
returned 1: svnlook: E000002: Can't open file
'/checkout/destination/path/format': No such file or directory
I looked into svnlook which is for looking at repos, and to me it seems the error is that this code is trying to make a repo in the /checkout/destination/path, instead of just trying to checkout code to there.
To summarize my question: Is the vcsrepo module trying to create a new repo or is it supposed to be just checking out the files to the specified destination path?
If the latter, where am I going wrong?
Okay so I did solve the problem, and It was due to already having created the ${doc_root}${fqdn}/src
directory. When the directory is already there, it treats the command as an update (I believe, thus requiring the format), so once I removed the before hand creation of the folder it worked. I should also note since I thought the svn users wasn't working I created an identity file (.ssh/config) for the root and that worked for me.
And as @Peter Souter mentioned, there is support for the user parameter user, I have yet to get it to work.
I'm going to try playing around with it some more in the future when I get the time . If anyone else has anything to add please feel free.
One more thing!! to actually get it working on a fresh puppet setup (with the .ssh/config file), I had to add the line:
StrictHostKeyChecking no
to the .ssh/config
, without it the checkout would fail, I believe due to the fact without the above line, it would ask to accept the server fingerprint, and puppet would then consider that a fail and move on.
Please let me know if I'm wrong on anything here, I don't want to be passing around incorrect info.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.