puppet-sudo icon indicating copy to clipboard operation
puppet-sudo copied to clipboard

How can I installed sudo-sssd instead of sudo?

Open dlangille opened this issue 10 months ago • 3 comments

I use the FreeBSD package built with support for sssd. The name of that package is sudo-sssd.

How do I tell puppet-sudo I want that package and not sudo. Happy to submit a patch for this later.

re: https://www.freshports.org/security/sudo/#history

Thanks.

dlangille avatar Mar 26 '25 20:03 dlangille

You would override this parameter: https://github.com/saz/puppet-sudo/blob/02ef57320f1c2611adf3b55f42158ad58680f6c0/manifests/init.pp#L122

Example in hiera:

sudo::package: sudo-sssd

Example in puppet code:

class { 'sudo':
  package => 'sudo-sssd',
}

kenyon avatar Mar 26 '25 21:03 kenyon

Then, for FreeBSD we can do something like:

  case $facts['os']['family'] {
    'FreeBSD': {
        $package_name = 'sudo-sssd'
    }
    'Debian': {
        $package_name = 'sudo'
    }
    default: {}
  }
  class { 'sudo':
    package => $package_name,
  }

And add more conditions if needed.

Szparki avatar Mar 28 '25 19:03 Szparki

We'll try this at $WORK and report back.

dlangille avatar Mar 31 '25 16:03 dlangille