如何使用stankevich-python木偶模块?

时间:2017-03-31 01:45:22

标签: python module puppet

我正在编写一个puppet清单文件,通过pip install安装python库。

此python模块安装在服务器上,链接如下所示https://forge.puppetlabs.com/stankevich/python

我已经通过

安装了模块
puppet module install stankevich-python

这是我在sites.pp中创建的清单文件

class { 'python' :
    version           => 'system',
    pip               => 'present'
}
python::pip { 'reportlab' :
    pkgname         => 'reportlab',
    ensure          => latest,
}

我的座席上的错误表明无法找到'python'资源

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class python at /etc/puppetlabs/code/environments/production/manifests/site.pp:6:1 on node dev1","issue_kind":"RUNTIME_ERROR","stacktrace":["Warning: The 'stacktrace' property is deprecated and will be removed in a future version of Puppet. For security reasons, stacktraces are not returned with Puppet HTTP Error responses."]}

但是,我已经验证了我的模块在那里,

$ puppet module list
/home/ubuntu/.puppetlabs/etc/code/modules
├── puppetlabs-stdlib (v4.16.0)
├── stahnma-epel (v1.2.2)
└── stankevich-python (v1.18.2)

任何建议表示赞赏。感谢。

1 个答案:

答案 0 :(得分:0)

我的坏。我需要运行

puppet module install stankevich-python
在root中,我没有。这样做之后就可以了。