我使用傀儡/Vcsrepo从Bitbucket(云)服务器向一组linux服务器分发和更新软件。多年来,这种方法运行良好,但大约6个月前,Puppet开始抱怨每次运行中的每个存储库Error: Path /usr/local/tools/... exists and is not the desired repository.。我认为,这个问题可能是在我们从基于prem的bitbucket版本转移到云版本时开始的。
如果我删除路径并运行傀儡,它将替换目录,然后在下一次运行时再次执行barfs。当我需要更新存储库时,我已经删除了它们。
傀儡代码已简化为:
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,
}任何想法,问题是什么,或如何诊断问题。
发布于 2022-12-16 22:19:20
是的,用于git 破产了的CVE修补程序是您现有的配置。这是在过去几天在Debian Buster上发布的,在系统傀儡(5.5.10-4)上造成了破坏。似乎没有适用于vcsrepo 3.2.1的修补程序,这是最新的支持Puppet 5的修补程序。我不知道为什么我的牛眼机器没有受到影响。
如果您可以升级到Puppet 6,那么当前的vcsrepo版本将处理这个问题。
如果不是,作为一种解决办法,您可以:
一次:
concat { '/etc/gitconfig' :
owner => 'root',
group => 'root',
mode => '0644',
}然后在每个循环中定义:
concat::fragment { "gitconfig_$repo" :
target => '/etc/gitconfig',
content => "[safe]\n\tdirectory = /usr/local/tools/$repo\n\n",
before => Vcsrepo["/usr/local/tools/$repo"],
}https://serverfault.com/questions/1103391
复制相似问题