saz / puppet-sudo

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

For (at least) FreeBSD, visudo(8) lives in /usr/local/sbin. #178

Closed stblassitude closed 7 years ago

stblassitude commented 7 years ago

Without this change, applying a config produces these errors:

Info: Computing checksum on file /usr/local/etc/sudoers.d/10_www
Info: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/File[10_www]: Filebucketed /usr/local/etc/sudoers.d/10_www to puppet with sum b12e0d6fb3e9b6348eb61115511b8ce2
Notice: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/File[10_www]/content: 

Notice: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/File[10_www]/content: content changed '{md5}b12e0d6fb3e9b6348eb61115511b8ce2' to '{md5}a84cbbe61e3fca60a31414f72c7959a5'
Info: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/File[10_www]: Scheduling refresh of Exec[sudo-syntax-check for file /usr/local/etc/sudoers.d/10_www]
Error: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/Exec[sudo-syntax-check for file /usr/local/etc/sudoers.d/10_www]: Failed to call refresh: Could not find command 'visudo'
Error: /Stage[main]/Sudo::Configs/Sudo::Conf[www]/Exec[sudo-syntax-check for file /usr/local/etc/sudoers.d/10_www]: Could not find command 'visudo'
Notice: Applied catalog in 1.01 seconds
# which visudo
/usr/local/sbin/visudo

Alternatively, the fully qualified path to visual should be made a parameter, or the Exec path should be made a parameter, with OS-specific values.

saz commented 7 years ago

Fixed with commit d41e6dad71e34aa8f1360fee6ce934a9fd247435