[Puppet Users] Help with augeas

Adam Crews
Wed, 27 Feb 2013 07:28:57 -0000

Hello,

I''m trying to manage a properties file used by a java program with
augeas.
I''m using PE 2.7.1 on a CentOS 5 machine.

Sample content is:
# Sample file /home/acrews/test.properties
session.securityLevel.createSession=10
session.securityLevel.listFiles=10
low.session.timeout=15
# eof

I want to change createSession from 10 to 11.

my puppet code is:

augeas { "test":
	lens	=> "Property.lns",
	incl	=> "/home/acrews/test.properties",
	changes	=> [ "set session.securityLevel.createSession 11" ],
	load_path	=> "/home/acrews/lens",
}

I grabbed the properties lens from
https://raw.github.com/maestrodev/augeas/af585c7e29560306f23938b3ba15aa1104951f7f/lenses/properties.aug
(since that is more robust than the one found on my system) and put it
in /home/acrews/lens.

When I run puppet, it fails to update the file:

debug: Augeas[test](provider=augeas): Opening augeas with root /, lens
path /home/acrews/lens, flags 64
debug: Augeas[test](provider=augeas): Augeas version 0.10.0 is installed
debug: Augeas[test](provider=augeas): Will attempt to save and only
run if files changed
debug: Augeas[test](provider=augeas): sending command ''set''
with
params
["/files/home/acrews/test.properties/session.securityLevel.createSession",
"11"]
debug: Augeas[test](provider=augeas): Closed the augeas connection
err: /Stage[main]//Augeas[test]: Could not evaluate: Save failed with
return code false

Full output is at:  http://pastebin.com/pa5MWYGH

I can''t figure out why it is failing.  Does anyone have any pointers
on how to make this work?

Thanks
-Adam