2017-10-29 117 views
0

我试图编辑我的木偶代理入住时间,但无法让它运行命令ini_settting我一直在关注本指南作为示例: linkPuppet:评估资源声明时出错,未知资源类型:'ini_setting'

ini_setting {'server_true': 
    path => '/tmp/server.conf', 
    section => 'main', 
    setting => 'server', 
    value => 'true', 
    } 

然而,当我运行ini_setting什么,我得到:错误:服务器错误500:无法检索从远程服务器的目录服务器错误:评估错误:错误而评估资源语句,未知的资源在/etc/puppetlabs/code/environments/production/manifests/test.pp输入:'ini_setting'

我也试过在一个类中声明它,并且有同样的错误。我也尝试了inifile::setting { 'agent_runinterval':从这个指南link与同样的问题。

我入住代码如下所示:

test.pp

ini_setting { "agent_runinterval": 
     ensure => present, 
     path => "/etc/puppetlabs/puppet/puppet.conf", 
     section => "main", 
     settting => "runinterval", 
     value => "21600" 
} 

我检查了配置文件被正确定位:

cat /etc/puppetlabs/puppet/puppet.conf 
# This file can be used to override the default puppet settings. 

按照傀儡docs我应该能够添加runinterval到主

注意:我不想在这里手动更改配置文件。

谢谢!

+2

你没有明确提到它,你安装了[inifile module](https://forge.puppet.com/puppetlabs/inifile)吗? – larsks

+0

@larsks谢谢!我以为我是在我的基础木偶安装模板中使用它,但事实证明它一路上失败了。现在好,再次感谢。 – Ben

回答

1

按照上面的Larsks的想法,原来模块一路上都失败了。

手动安装使用puppet module install puppetlabs-inifile --version 2.0.0,一切都很好。再次感谢。

相关问题