【问题标题】:Puppet: Error while evaluating a Resource Statement, Unknown resource type: 'ini_setting'Puppet:评估资源语句时出错,未知资源类型:'ini_setting'
【发布时间】:2017-10-29 03:37:55
【问题描述】:

我正在尝试编辑我的 puppet 代理签入时间,但无法让它运行命令 ini_settting 我一直以本指南为例:link

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

但是,当我使用ini_setting 运行任何内容时,我得到:错误:无法从远程服务器检索目录:服务器上的错误 500:服务器错误:评估错误:评估资源语句时出错,未知资源类型:' ini_setting' 在 /etc/puppetlabs/code/environments/production/manifests/test.pp

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

我的签到代码如下:

测试.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 添加到main

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

谢谢!

【问题讨论】:

  • 你没有明确提到,你安装了inifile module吗?
  • @larsks 谢谢!我以为我在我的基本 puppet 安装程序模板中有它,但结果它一路失败。现在一切都好,再次感谢。

标签: linux puppet


【解决方案1】:

根据上述 Larsks 的想法,结果模块在此过程中失败了。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多