Amazon ec2 无法识别tmp目录中的文件
我对我的redhat ec2的Augeas有意见。我最近开始使用这个API,到目前为止只用于Amazon ec2 无法识别tmp目录中的文件,amazon-ec2,puppet,rhel,augeas,Amazon Ec2,Puppet,Rhel,Augeas,我对我的redhat ec2的Augeas有意见。我最近开始使用这个API,到目前为止只用于/etc/目录中的更改 这是我使用的操作系统 OS: Red Hat Enterprise Linux Server release 6.4 (Santiago) 我最近发现,除了/etc/和/boot/中的文件之外,augtool无法识别任何其他文件 例如:augtool>print/files/tmp/sample/test.cfg不会给出任何结果 test.cfg [Credentials] Ke
/etc/
目录中的更改
这是我使用的操作系统
OS: Red Hat Enterprise Linux Server release 6.4 (Santiago)
我最近发现,除了/etc/和/boot/中的文件之外,augtool无法识别任何其他文件
例如:augtool>print/files/tmp/sample/test.cfg
不会给出任何结果
test.cfg
[Credentials]
Keys = True
出于测试目的,我将该文件从/tmp/移动到/etc/httpd/conf.d/,但augeas仍然没有打印它的内容。它在哪里打印apache配置文件的配置树
我想把它们放在木偶里,下面是我的代码:
augeas {"changeTest" :
context => "/files/tmp/sample/test.cfg",
changes => "set Credentials/Keys False"
}
这是我在puppet调试中看到的:
Debug: Augeas[changeTest](provider=augeas): sending command 'set' with params ["/files/tmp/sample/test.cfg/Credentials/Keys", "False"]
Debug: Augeas[changeTest](provider=augeas): Skipping because no files were changed
我在这里写什么?Augeas不“识别”文件,也不知道这些文件的标准路径/tmp不是任何配置文件的标准位置,因此augeas不知道该做什么
在Puppet中,您可以告诉augeas对给定文件使用哪个镜头(即解析器):
augeas {"changeTest" :
incl => "/tmp/sample/test.cfg",
lens => "Httpd.lns",
changes => "set Credentials/Keys False",
}
有关一些示例和陷阱,请参阅,如果这个Atlassian页面也提到了augeasproviders,那就太好了。