Skip to content

Instantly share code, notes, and snippets.

@rkhatibi
Created February 23, 2012 22:38
Show Gist options
  • Save rkhatibi/1895471 to your computer and use it in GitHub Desktop.
Save rkhatibi/1895471 to your computer and use it in GitHub Desktop.
class sshd::data {
$enable = extlookup('sshd_enable', 'present')
}
class sshd {
include sshd::params, sshd::data
case $sshd::data::enable {
'absent': { include sshd::absent }
'disable': { include sshd::service::disable }
default: {
include sshd::install, sshd::config, sshd::service
Class['sshd::install'] -> Class['sshd::config'] ~> Class['sshd::service']
}
}
}
class sshd::install {
package { 'sshd':
ensure => $sshd::data::enable,
name => $sshd::params::packagename,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment