Augeas资源未对配置应用更改。文件

时间:2017-09-11 15:22:27

标签: puppet augeas

我正在使用Augeas测试一些配置更改,我可以看到Puppet获取更改,但它们实际上并未应用于磁盘:

Notice: Augeas[db-connection](provider=augeas):
--- /opt/myconfigfile.xml       2017-09-11 11:56:18.072779400 +0000
+++ /opt/myconfgfile.xml.augnew        2017-09-11 14:54:57.403377000 +0000

Notice: /Stage[main]/myserver::Configuration_someconfig/Augeas[db-connection]/returns: executed successfully

但我也看到了这一点:

   Info: Stage[main]: Unscheduling all events on Stage[main]

1 个答案:

答案 0 :(得分:1)

   augeas { 'test1':
        lens    => 'Xml.lns',   
        tag     => 'my-config',
        incl => $mysystem_xml,
        context => "/files$mysystem_xml/properties",
        changes => [ 
        "set entry[#attribute/key='ProviderType']/#text $myserver::provider_type", 
        ],
      }