我第一次在项目中使用 Vagrant 和 Puppet,但我一直遇到问题。
我使用 PuPHPet 作为起点,我的 default.pp 清单中有以下代码段:
class { 'apache': }
apache::dotconf { 'custom':
content => 'EnableSendfile Off',
}
apache::module { 'rewrite': }
apache::vhost { 'awesome.dev':
server_name => 'awesome.dev',
serveraliases => [
],
docroot => '/var/www',
port => '80',
directories => [ { path => '/var/www/', allow => 'from all', allow_override => ['All'] } ],
env_variables => [],
priority => '1',
}
当我运行它时,我总是收到以下错误:
warning: Could not retrieve fact fqdn
Invalid parameter directories at /tmp/vagrant-puppet/manifests/default.pp:46 on node precise32
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --verbose --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]
第 46 行是 apache::vhost 规则的结尾。我想将其设置为允许使用 htaccess 覆盖,但我看不到哪里出错了。任何人都可以看到问题是什么?