0

I am automating rhnplugin config file in puppet, below is my manifests

augeas { 'config' :
    lens => 'Simplevars.lns',
    incl => '/etc/yum/pluginconf.d/rhnplugin.conf',
   changes => 'set /etc/yum/pluginconf.d/rhnplugin.conf/test " " '
 }

getting below error

Warning: Augeas[config](provider=augeas): Loading failed for one or more files, see debug for /augeas//error outputeven

I tried with "simplelines lenses" not getting any o/p

I used "simplelines and simplevars" since could not find lenses for rhnplugin.

I treid in augtool and it worked

augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test
augtool> save
Saved 1 file(s)
augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled 1
augtool> save
Saved 1 file(s)
augtool> print /files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled = "1"

My doubt is can't we convert int to augeas resource if the lenses are not available.

4

1 回答 1

0

rhnplugin.conf 不是简单变量(即键=值)格式。它是一个inifile。我的建议是使用 puppet labs 的 inifile 模块来修改它。

于 2015-08-13T07:47:17.617 回答