我正在一个vagrant项目中使用puppet作为我的配置管理器。我尝试添加一个自定义bash_profile的模块。
puppet的module_path
已设置为:
puppet.module_path = "puppet/modules"
我的bash_profile模块的类看起来像这样:
class bash_profile
{
file
{
"/home/vagrant/bash_profile":
ensure => present,
source => "puppet:///modules/bash_profile/files/bash_profile"
}
}
这是我的 Puppet 结构的文件结构:
puppet
| manifests
| | phpbase.pp // my main manifest file that has includes for modules
| modules
| | bash_profile
| | | files
| | | | bash_profile // the actual bash_profile file I want to ensure is present on my VM
| | | manifests
| | | | init.pp // the init file included for the bash_profile class
当我运行Vagrant的配置时,遇到了以下错误:
错误:/Stage[main]/Bash_profile/File[/home/vagrant/bash_profile]无法评估:无法从环境生产源“puppet:///modules/bash_profile/files/bash_profile”检索信息,位于/tmp/vagrant-puppet-1/modules-0/bash_profile/manifests/init.pp:8
我不确定为什么无法检索信息。路径似乎是正确的。有人能看出我错过了什么吗?