voxpupuli / puppet-augeasproviders_grub

Augeas-based grub type and providers
Apache License 2.0
9 stars 33 forks source link

Kernel_parameter subscribe executes on every run #41

Closed ztnewman closed 2 years ago

ztnewman commented 5 years ago

I am currently using augeasproviders_grub version 3.0.1 with Puppet master version 2018.1.2 and agent version 5.5.3.

I have a notify resource that subscribes to a kernel_parameter resource as below:

kernel_parameter { 'audit':
  value  => '1',
}

notify { 'The audit kernel parameter has changed, please reboot':
  subscribe => Kernel_parameter['audit']
}

The notify occurs every time that puppet runs instead of whenever there is a change to the kernel_parameter. Is that intentional?

raphink commented 5 years ago

I don't think this has anything to do with the kernel_parameter resource type actually. As far as I know, notify resources are executed every time and do not support subscribing to other resources.

You might want to use an exec resource with refreshonly set to true instead.