Manually installing Webmin on a Debian machine

I’m a big fan of Webmin for system administration, but it’s rarely in the standard repos. This recipe installed a specific version manually.

NOTE — This assumes you are using my Recipes/Monit recipe. Remove monit::package { “webmin”: } if not.

Anybody wishing to help by porting to other OS’s, please feel free…

class webmin {
    monit::package { "webmin": }

    $base = "webmin_1.480_all.deb"
    $url = "http://prdownloads.sourceforge.net/webadmin/"
    $archive = "/root/$base"
    $installed = "/etc/webmin/version"

    package { "libnet-ssleay-perl": ensure => installed }
    package { "libauthen-pam-perl": ensure => installed }
    package { "libio-pty-perl": ensure => installed }
    package { "libmd5-perl": ensure => installed }

    service { webmin:
        ensure => running,
        require => Exec["InstallWebmin"],
        provider => init;
    }

    exec { "DownloadWebmin":
        cwd => "/root",
        command => "wget $url$base",
        creates => $archive,
    }

    exec { "InstallWebmin":
        cwd => "/root",
        command => "dpkg -i $archive",
        creates => $installed,
        require => Exec["DownloadWebmin"],
        notify => Service[webmin],
    }

}