voxpupuli / puppet-kmod

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

Add purge option #62

Closed jeandoBet closed 3 years ago

jeandoBet commented 3 years ago

Hi,

Could it be possible to add a purge option for the directory /etc/modprobe.d ?

You could change your init.pp file to :

class kmod (
  Optional[Hash] $list_of_aliases    = {},
  Optional[Hash] $list_of_blacklists = {},
  Optional[Hash] $list_of_installs   = {},
  Optional[Hash] $list_of_loads      = {},
  Optional[Hash] $list_of_options    = {},
  Boolean $dir_purge                 = false,
){

  file { '/etc/modprobe.d':
    ensure  => directory,
    purge   => $dir_purge,
    recurse => $dir_purge
  }
[....]

Declaration would give :

 class { 'kmod':
    dir_purge => true
  }

Hope this can be implemented, Thanks

raphink commented 3 years ago

Sure, that seems like a good idea.

Can you submit a PR for this please?

jeandoBet commented 3 years ago

Sure, but it seems I don't have the permissions to push a new branch

raphink commented 3 years ago

That's normal. You need to push to your fork and open a Pull Request.

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.