I use puppet/Vcsrepo to distribute and update software to a bunch of linux servers from a Bitbucket(cloud) server. This worked fine for years but about 6 months ago Puppet started complaining about every repository Error: Path /usr/local/tools/... exists and is not the desired repository.
on every run. I think the issue may have started when we moved from on on prem version of bitbucket to the cloud version.
If I delete the path and run puppet the it replaces the directory and then barfs again on the next run. I have ended up deleting the repositories whenever I need them updated.
The puppet code has been simplified down to:
define deploy(Array $names) {
$names.each |$repo| {
vcsrepo { "/usr/local/tools/$repo":
ensure => present,
provider => git,
user => 'tools',
source => "https://xxxx@bitbucket.org/uoa/$repo.git",
}
}
}
.....
$names_list = [
'common-library',
'common-tools'
]
...::deploy {"base-tools":
names => $names_list,
}
Any ideas what the issue is or how to diagnose the problem.