Vagrant Puppet-无法找到已声明的类
我试图在puppet中使用类。我有以下设置:Vagrant Puppet-无法找到已声明的类,vagrant,puppet,Vagrant,Puppet,我试图在puppet中使用类。我有以下设置: 显示/ default.pp web.pp 我试图在我的default.pp中调用类web: class { 'web': } 我有以下错误: "Error: Could not find class web for ubuntu-14.localdomain on node ubuntu-14.localdomain" 我做错了什么 该类在web.pp中声明如下: class web { package {'apache2':
- 显示/
- default.pp
- web.pp
class { 'web': }
我有以下错误:
"Error: Could not find class web for ubuntu-14.localdomain on node ubuntu-14.localdomain"
我做错了什么
该类在web.pp中声明如下:
class web {
package {'apache2':
ensure => 'installed',
}
}
我还尝试将该类称为:include web您可能应该将该web类作为一个新模块移动
puppet
├── _manifest
| └── default.pp
├── _modules
| ├── _web
| | └── _manifests
| | └── init.pp
只需将文件web.pp
重命名为web/manifest/init.pp
在default.pp
中,确保包含您的模块:
class { 'web': }
include web
PS:确保从vagrant配置中引用您的模块目录