【发布时间】:2014-10-02 20:37:21
【问题描述】:
我继承了一个使用 Puppet、Vagrant 和 VirtualBox 来配置本地 Centos 测试机的 python 应用程序。
这个应用是在 Mac 上编写的,我正在 Windows 上开发。
当我运行vagrant up 时,我看到一大串command line errors,其中最相关的是:
Running Puppet with site.pp..
Warning: Config file /home/vagrant/hiera.yaml not found, using Hiera defaults
WARN: Fri Apr 25 16:32:24 +0100 2014: Not using Hiera::Puppet_logger. It does not report itself to b
e suitable.
我知道 Hiera 是什么,以及为什么它很重要,但我不确定如何解决这个问题。
文件 hiera.yaml 存在于 repo 中,但在 home/vagrant/hiera.yaml 中找不到它,而是在 ./puppet/manifests/hiera.yaml 中找到它/em>.... 同样,如果我 ssh 进入盒子,home/vagrant 里面绝对没有任何东西,但是当我查看 /tmp
时我可以找到这个文件所以我很困惑,是否 vagrant 正在查看虚拟框并期望在 home/vagrant/hiera.yaml 中找到此文件?还是我继承了一个一开始就不能正常工作的应用程序?我真的被困在这里,我无法与原始开发人员取得联系。
以下是我的 Vagrantfile 中的一些详细信息:
Vagrant.configure("2") do |config|
# Base box configuration ommitted
# Forwarded ports ommitted
# Statically set hostname and internal network to match puppet env ommitted
# Enable provisioning with Puppet standalone
config.vm.provision :puppet do |puppet|
# Tell Puppet where to find the hiera config
puppet.options = "--hiera_config hiera.yaml --manifestdir /tmp/vagrant-puppet/manifests"
# Boilerplate Vagrant/Puppet configuration
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
# Custom facts provided to Puppet
puppet.facter = {
# Tells Puppet that we're running in Vagrant
"is_vagrant" => true,
}
end
# Make the client accessible
config.vm.synced_folder "marflar_client/", "/opt/marflar_client"
end
真的很奇怪。
【问题讨论】:
标签: vagrant puppet vagrantfile