我尝试在hosts.allow中创建一个新条目
augeas { "Add in hosts allow" :
context => '/files/etc/hosts.allow',
changes => [
'ins 01 after *[last()]',
'set 01/process[1] ssh',
'set 01/process[2] ssh2',
'set 01/client ipaddr'
],
}但是它不工作,我得到这个错误
Notice: Compiled catalog for server.local in environment production in 0.96 seconds
Error: /Stage[main]/Nfs::Server/Augeas[Add in hosts allow]: Could not evaluate: Error sending
command 'ins' with params ["01", "after", "/files/etc/hosts.allow/*[last()]"]/Error sending
command 'ins' with params ["01", "after", "/files/etc/hosts.allow/*[last()]"]我不知道如何使用ins命令,消息不会让我知道出了什么问题。
CentOS6.4
木偶版本: 3.3.1
augeasversion (来自facter):0.9.0
我找不到augtools的版本,也无法执行命令,因为它没有安装(我不知道puppet如何调用它)
发布于 2015-01-15 16:54:09
是否尝试在上下文中添加前导"/“?
(日志记录有点奇怪,根本没有显示"files“前缀,我想知道您的代码示例和日志记录是否匹配。)
https://stackoverflow.com/questions/27959119
复制相似问题