Puppet 伪Postgresql错误

Puppet 伪Postgresql错误,puppet,Puppet,我使用puppet对postgresql安装应用增量更改 sudo puppet apply --modulepath=/vagrant/puppet/modules -e "include iwd-postgresql" 这将导致以下错误: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class postgresql::globals at /vag

我使用puppet对postgresql安装应用增量更改

sudo puppet apply --modulepath=/vagrant/puppet/modules -e "include iwd-postgresql"
这将导致以下错误:

Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class postgresql::globals at /vagrant/puppet/modules/iwd-postgresql/manifests/init.pp:6 on node target.intware.com
Wrapped exception:
Could not find declared class postgresql::globals
我已经安装了puppetlabs/postgresql模块

如果我做一个木偶列表,我会看到以下内容:

[vagrant@target ~]$ puppet module list
    /home/vagrant/.puppet/modules
    ├── puppetlabs-apt (v2.2.0)
    ├── puppetlabs-concat (v1.2.4)
    ├── puppetlabs-postgresql (v4.6.0)
    └── puppetlabs-stdlib (v4.9.0)
/usr/共享/木偶/模块(未安装模块)


有什么想法吗?我正在vagrant的主文件夹中的vagrant虚拟机上运行appply命令。

@ChrisPitman的评论为我指明了正确的方向。我需要设置正确的模块路径,以包括我们的定制模块和预构建模块

以下几点对我很有用:

sudo puppet apply --modulepath=/vagrant/puppet/modules:/etc/puppet/modules -e "include iwd-postgresql"

当您使用命令
puppet apply
时,您使用的是此路径
/home/vagrant/puppet/modules
,但是您的模块安装在
/home/vagrant/.puppet/modules
下,如果您使用的是
vagrant
,则无论如何,我认为如果你将
vagrant文件
用于puppet并自定义你的虚拟机

什么在
/vagrant/puppet/modules
?@ChrisPitman,我已经将puppet模块列表的输出放在了问题中。为什么你在运行
puppet apply
时设置模块路径,而不是在列出模块时设置模块路径?@ChrisPitman,我这样设置modulepath是因为我的开发团队在这里定义了他们的puppet资源。但你的评论为我指明了正确的方向。