Hi,
i'm currently having trouble with augeas. A snipplet which worked fine on 
my homebox ( ubuntu, some 3.+ puppet, some weeks old... ) does not work on 
a RHEL6 /Puppet 3.7.4/augeas 1.0 installation:

basically, i want to modify the sudoers file with augeas.

using augtool this works fine, so i'd say the sudoers file itself is 
formatted correctly and parseable:

*tail -n 2 /etc/sudoers*
## Read drop-in files from /etc/sudoers.d (the # here does not mean a 
comment)
#includedir /etc/sudoers.d

*augtool*
augtool> set /files/etc/sudoers/Defaults[type=':someuser']/type :someuser
augtool> set /files/etc/sudoers/Defaults[type=':someuser']/env_reset ''
augtool> save
Saved 1 file(s)
augtool> quit

*tail -n 2 /etc/sudoers*
#includedir /etc/sudoers.d
Defaults:someuser env_reset


Now the same using a puppet manifest (restored sudoers to original state 
before..):

*cat test.pp*
augeas { 'sudotest':
    context => '/files/etc/sudoers',
    changes => [
        "set Defaults[type=':someuser']/type :someuser",
        "set Defaults[type=':someuser']/env_reset ''",
    ],
}

*puppet apply --debug --verbose --trace test.pp*
*[...]*
Info: Applying configuration version '1431415823'
Debug: Augeas[sudotest](provider=augeas): Opening augeas with root /, lens 
path /var/lib/puppet/lib/augeas/lenses, flags 32
Debug: Augeas[sudotest](provider=augeas): Augeas version 1.0.0 is installed
Warning: Augeas[sudotest](provider=augeas): Loading failed for one or more 
files, see debug for /augeas//error output
Debug: Augeas[sudotest](provider=augeas): /augeas/files/etc/sudoers/error = 
mxfm_load
Debug: Augeas[sudotest](provider=augeas): 
/augeas/files/etc/sudoers/error/message = Lenses @FixedSudoers and @Sudoers 
could be used to load this file
Debug: Augeas[sudotest](provider=augeas): Will attempt to save and only run 
if files changed
Debug: Augeas[sudotest](provider=augeas): sending command 'set' with params 
["/files/etc/sudoers/Defaults[type=':someuser']/type", ":someuser"]
Debug: Augeas[sudotest](provider=augeas): sending command 'set' with params 
["/files/etc/sudoers/Defaults[type=':someuser']/env_reset", ""]
Debug: Augeas[sudotest](provider=augeas): Closed the augeas connection
*Error: /Stage[main]/Main/Augeas[sudotest]: Could not evaluate: Saving 
failed, see debug*
/usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:104:in `fail'
[...stracktrace..]
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8
Debug: Finishing transaction 69982032540120
Debug: Storing state
Debug: Stored state in 0.04 seconds


Any ideas what's going on here? I already tried different formattings of 
that test.pp file ( escaped parameters) and easier versions, too ( just a 
set Defaults/env_reset) etc. -nothing works.
Modifying other files ( /etc/hosts) does work, so augeas is basically 
working.

an augtool print /augeas//error does not show anything...

appreciate any help...

bjoern

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d09db41f-a30a-4f46-a745-3380cf2215c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to