git - Error while evaluating a Resource Statement, Unknown resource type: 'vcsrepo'
问题描述
I am deploying my code using puppet. I am trying to clone code from git repo
vcsrepo { "/home/$server_admin/public_html":
ensure => latest,
owner => "$server_admin",
group => "$server_admin",
provider => git,
require => [ Package["git"] ],
source => "$server_gitrepo",
revision => "$server_gitbranch",
}
when executing script on client machine.
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'vcsrepo' (file: /etc/puppetlabs/code/environments/production/modules/alpha/manifests/source.pp, line: 32, column: 4) on node
Note: git already installed on client machine
解决方案
在 Puppet 服务器上报告错误。它与客户端是否安装了Git无关。事实上,它与 Git 根本没有太大关系。
Puppet 抱怨——实际上相当清楚——它无法识别vcsrepo
您尝试使用的资源类型。这确实不是内置资源类型,因此如果您没有使用该名称编写自定义类型或从模块中获得一个,那么 Puppet 不知道您在说什么。
很可能您正在寻找puppetlabs/vcsrepo模块,它确实提供了该名称的类型,但我们无法确定。
推荐阅读
- c++ - 如果我想让 cmake 总是使用 g++5.4 我该怎么办
- powershell - PowerShell 从 CSV 中删除行
- typescript - 开玩笑:node_module 依赖项使用了 import 语句并导致测试崩溃
- javascript - 如何在 Framework7 Store 中查看变量
- javascript - 获取 api 响应数据超出范围
- hex - 如何将包含十六进制的字符串转换为数字?
- python - 无法在 OSX 上使用 pip 安装 Fastquant
- android - 更新后的错误android反应本机,我无法打开应用程序
- kubernetes - kubectl:无法识别“csr.yaml”:版本“certificates.k8s.io/v1”中的种类“CertificateSigningRequest”没有匹配项
- python - 字段 'id' 需要一个数字,但得到了 'admin'。在 django