gpt4 book ai didi

vagrant - 无法从环境生产源检索信息

转载 作者:行者123 更新时间:2023-12-04 01:33:38 26 4
gpt4 key购买 nike

我在我的一个 Vagrant 项目中使用 puppet 作为我的供应商。我正在尝试为自定义 bash_profile 添加一个模块。
module_path puppet 的设置为:

 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 运行配置时,出现错误

err: /Stage[main]/Bash_profile/File[/home/vagrant/bash_profile]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/bash_profile/files/bash_profile at /tmp/vagrant-puppet-1/modules-0/bash_profile/manifests/init.pp:8



我不确定为什么它无法检索信息。路径似乎是正确的。谁能看到我错过了什么?

最佳答案

是的,您不应该包含文字 files/在网址中。相反,它应该只是

puppet:///modules/bash_profile/bash_profile

关于vagrant - 无法从环境生产源检索信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24213407/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com