2013-11-03 77 views
0

我想用木偶来设置nginx。我发现这个模块:通过木偶设置nginx

https://github.com/example42/puppet-nginx

我使用的流浪,我相信包括在“模块”目录中的所有模块。我已将puppet-nginx添加到该目录中。

我有一个清单文件,其中有:

class { "nginx": } 

然而,这似乎并没有工作。

Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class nginx at /tmp/vagrant-puppet/manifests/default.pp:50 on node vagrant-ubuntu-raring-64 

任何想法,为什么这不工作? 谢谢!

回答

0

检查是否配置流浪正确:

木偶
  • 配置必须启用
  • 你可以尝试设置module_path明确
  • 尝试目录puppet-nginx重命名为nginx(或创建符号链接)
+0

出于某种原因,重命名目录的nginx做的工作!谢谢!任何想法为什么寿? – Karan

+1

这是因为当你指定'nginx'类时,Puppet试图在文件'$ MODULEDIR'/nginx/manifests/init.pp'中找到这个类。 –

0

在您的Vagrant目录问题

puppet module install --force "example42/nginx" --target-dir ./puppet/modules 

确保您Vagrantfile包含以下内容:

config.vm.provision :puppet do |puppet| 
    puppet.module_path = 'puppet/modules' 
end