voxpupuli / puppet-kmod

manage kernel module with puppet
Apache License 2.0
17 stars 63 forks source link

Change setting to only remove option on absent #43

Closed mjrasobarnett closed 3 years ago

mjrasobarnett commented 7 years ago

Hello, I noticed that setting 'ensure => absent' on kmod::option/setting would remove the whole line, instead of just the particular option that was being managed. This change just modifies the augeas command when the option is 'absent' to only remove that particular setting if it is present.

I noticed this on a file where I had two options being managed, but one was occasionally set to be 'absent'. In these cases puppet would remove the whole line, then re-add the second option on every puppet run.

In my testing this change appears to work as I would expect, but I am not an augeas expert.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.