Puppet 无法调用嵌套的自定义模块-";找不到类“;错误

Puppet 无法调用嵌套的自定义模块-";找不到类“;错误,puppet,Puppet,我已经创建了一个自定义模块,我想把它保存在一个子目录(category)中,因为有几个组件在逻辑上应该属于这个类别。因此,为了更好地隔离事物,我创建了以下结构 - hieradata - manifests - modules - infra - git - files - manifests - init.pp - install.pp

我已经创建了一个自定义模块,我想把它保存在一个子目录(category)中,因为有几个组件在逻辑上应该属于这个类别。因此,为了更好地隔离事物,我创建了以下结构

- hieradata
- manifests
- modules
    - infra
        - git
            - files
            - manifests
                - init.pp
                - install.pp
                - configure.pp
        - monitoring
        - etc
- templates

$ cat modules/infra/git/manifests/init.pp
class infra::git {}

$ cat modules/infra/git/manifests/install.pp
class infra::git::install {
    file { 'Install Git':
        ...
        ...
    }
}

$ cat manifests/site.pp
node abc.com {
    include infra::git::install
}
现在在puppet代理上,当我尝试
puppet代理-t
时,我得到以下错误:

ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]

C:\puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::infra::git::install for abc.com at /etc/puppetlabs/code/environments/production/manifests/site.pp:15:2 on node abc.com","issue_kind":"RUNTIME_ERROR"}
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
我已经阅读了链接,但这建议将自定义模块直接放在主
modules
目录下,这不是我想要构建目录的方式


任何帮助都将不胜感激。

我们不会为您解决这个特定的技术问题,我将继续帮助您解决这个技术问题所产生的更大的架构/设计问题:@MattSchuchard:几天前我已经看过了角色和配置文件,我肯定觉得我的整个Puppet结构应该是这样的,但我计划在下一个重构阶段做这件事。你能告诉我我目前的方法有什么问题吗?这仅仅是一些语法问题,还是这种方法行不通?请在这里查看John Bollinger和我在您的问题上的临时解决方法:。请注意,我们都建议不要做您在问题中描述的事情。根据您当前的布局,您访问角色和个人资料的速度越快越好。非常感谢@MattSchuchard!成功了。:)我一定会尽快进行重构。听起来很棒。我劝你们赶快行动的原因是因为这种方法会在过渡期间积累一些技术债务,