Hey gang, I''m using the latest Puppet/Augeas RPMs from EPEL testing: puppet-0.24.8-1.el5.1 augeas-0.4.2-1.el5 augeas-libs-0.4.2-1.el5 I have the following in my Puppet manifest: augeas { "rpm": context => "/etc/logrotate.d/rpm", changes => [ "set rule/create/mode 0640", "set rule/create/owner root", "set rule/create/group root" ], } This should add a "create 0640 root root" line to the /etc/logrotate.d/rpm file. Contents of the current /etc/logrotate.d/rpm file: /var/log/rpmpkgs { weekly notifempty missingok } (No create line in there) I get the following in my puppetd debug trace: debug: Augeas[rpm](provider=augeas): Opening augeas with root /, lens path , flags 0 debug: Augeas[rpm](provider=augeas): Augeas version 0.4.2 is installed debug: Augeas[rpm](provider=augeas): Will attempt to save and only run if files changed debug: Augeas[rpm](provider=augeas): sending command ''set'' with params ["/etc/logrotate.d/rpm/rule/create/mode", "0640"] debug: Augeas[rpm](provider=augeas): sending command ''set'' with params ["/etc/logrotate.d/rpm/rule/create/owner", "root"] debug: Augeas[rpm](provider=augeas): sending command ''set'' with params ["/etc/logrotate.d/rpm/rule/create/group", "root"] debug: Augeas[rpm](provider=augeas): Skipping becuase no files were changed debug: Augeas[rpm](provider=augeas): Closed the augeas connection So, for some reason Augeas doesn''t see any changes being made to the file by the set commands. If I run the set commands in augtool (in exactly the same order) and then run "save", then I do get changes to my file. Is this a bug with the Puppet augeas type? Thanks, Avi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Avi Miller wrote:> Hey gang, > > I''m using the latest Puppet/Augeas RPMs from EPEL testing: > > puppet-0.24.8-1.el5.1 > augeas-0.4.2-1.el5 > augeas-libs-0.4.2-1.el5 > > I have the following in my Puppet manifest: > > augeas { "rpm": > context => "/etc/logrotate.d/rpm", > changes => [ "set rule/create/mode 0640", > "set rule/create/owner root", > "set rule/create/group root" ], > }One augeas nuance that makes it way up into puppet.... all files in augeas are stored under /files. So.. you should write your command as below: augeas { "rpm": context => "/files/etc/logrotate.d/rpm", changes => [ "set rule/create/mode 0640", "set rule/create/owner root", "set rule/create/group root" ], } Try that and let me know if it works. -- bk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Bryan, On Mon, Mar 30, 2009 at 11:16 PM, Bryan Kearney <bkearney@redhat.com> wrote:> One augeas nuance that makes it way up into puppet.... all files in > augeas are stored under /files. So.. you should write your command as below:I knew this, and stared at that block for ages and still didn''t spot that! Though, it would be nice if Puppet gave an error response. It appeared to have worked, but obviously didn''t. Thanks! Avi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, 2009-03-31 at 11:41 +1100, Avi Miller wrote:> On Mon, Mar 30, 2009 at 11:16 PM, Bryan Kearney <bkearney@redhat.com> wrote: > > One augeas nuance that makes it way up into puppet.... all files in > > augeas are stored under /files. So.. you should write your command as below: > > I knew this, and stared at that block for ages and still didn''t spot > that! Though, it would be nice if Puppet gave an error response. It > appeared to have worked, but obviously didn''t.I was thinking that the provider should probably check that the context starts with /files, but hardcoding that seems just a little icky. A better solution would be to check that the context matches exactly one node, and produce an error if it doesn''t. (Also, with Augeas 0.5.0, you can define variables for use in path expressions, which should greatly reduce the need for a special context; if that gets exposed in the type, we could deprecate the context property. The Augeas type is definitely pushing the expressiveness of puppet''s data typing abilities) David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---