saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
105 stars 215 forks source link

Variable-tolerant and nopasswd-enabled user template #246

Closed gcoxmoz closed 4 years ago

gcoxmoz commented 4 years ago

This edits templates/user_groups.erb to bring in tolerance for missing variables. Patch 1: If someone besides sudo::allow wants to use the template, it's not really necessary to provide $groups = [] when the template can simply ignore the groups section if the variable isn't there. Patch 2: This allows for a conf file for users/groups that are allowed to sudo without a password. The template change is the important part, but I've added the Boolean to sudo::allow to make it usable there. By default, nopasswd is false, meaning someone must set a flag in order to let people sudo passwordless.

gcoxmoz commented 4 years ago

Withdrawn, will try something different.