Augeas: Skipping because no files were changed

396 views
Skip to first unread message

Chris Lee

unread,
Jul 7, 2015, 2:33:05 PM7/7/15
to puppet...@googlegroups.com
I am trying to add two new options to grub.conf using augeas.
The code is as follows:

    augeas { 'grub.conf/8250_LAR':
            tag
=> chris1,
            incl    
=> '/boot/grub/grub.conf',
            lens    
=> 'Grub.lns',
            changes
=> [
               
'set /title[1]/kernel/8250.nr_uarts 8',
               
'set /title[1]/kernel/8250_core.nr_uarts 8',
           
],
   
}


However nothing is added to /etc/grub.conf at all, and the puppet run completes as follows with debug.

Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Augeas version 1.0.0 is installed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): sending command 'set' with params ["/title[*]/kernel/8250.nr_uarts", "8"]
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): sending command 'set' with params ["/title[*]/kernel/8250_core.nr_uarts", "8"]
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Skipping because no files were changed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Closed the augeas connection

Manually, Augeas appears to work fine:

augtool> set /files/boot/grub/grub.conf/title[1]/kernel/8250_core.nr_uarts 8
augtool
> save
Saved 1 file(s)

I'd appreciate any ideas?


Thanks
Chris

Ian Mortimer

unread,
Jul 8, 2015, 2:59:46 AM7/8/15
to puppet...@googlegroups.com
On Tue, 2015-07-07 at 07:33 -0700, Chris Lee wrote:

> I am trying to add two new options to grub.conf using augeas.
> The code is as follows:
>
> augeas { 'grub.conf/8250_LAR':
> tag => chris1,
> incl => '/boot/grub/grub.conf',
> lens => 'Grub.lns',
> changes => [
> 'set /title[1]/kernel/8250.nr_uarts 8',
> 'set /title[1]/kernel/8250_core.nr_uarts 8',
> ],
> }

This needs:

context => '/files/etc/grub.conf',


--
Ian

Ian Mortimer

unread,
Jul 8, 2015, 3:23:59 AM7/8/15
to puppet...@googlegroups.com
On Tue, 2015-07-07 at 07:33 -0700, Chris Lee wrote:

> I am trying to add two new options to grub.conf using augeas.
> The code is as follows:
>
> augeas { 'grub.conf/8250_LAR':
> tag => chris1,
> incl => '/boot/grub/grub.conf',
> lens => 'Grub.lns',
> changes => [
> 'set /title[1]/kernel/8250.nr_uarts 8',
> 'set /title[1]/kernel/8250_core.nr_uarts 8',
> ],
> }

Actually in this case it needs:

context => '/files/boot/grub/grub.conf',

or:

context => '/files/etc/grub.conf',
incl => '/etc/grub.conf',


--
Ian

Chris Lee

unread,
Jul 8, 2015, 11:47:59 AM7/8/15
to puppet...@googlegroups.com
Thanks Ian,

I had tried with and without the context, also tried with set and setm, tried to include the values first... but nothing worked.

I was about to go insane and through to remove the trailing slash in the changes...

    augeas { 'grub.conf/8250_LAR':
            incl
=> '/etc/grub.conf',

            lens    
=> 'Grub.lns',
            changes
=> [

               
'set title[1]/kernel/8250.nr_uarts 4',
               
'set title[1]/kernel/8250_core.nr_uarts 4',
           
],
   
}
 and now it works, with and without the context.. but I'll put it back in anyway just in case.

Thanks!

Chris
Reply all
Reply to author
Forward
0 new messages