case $operatingsystem {
  centos, redhat: {$build_essential = ["make", "automake", "gcc", "gcc-c++", "kernel-devel"]}
  debian, ubuntu: {$build_essential = ["build-essential"]}
  default: {fail("Don't know how to make build-essential for $operatingsystem")}
}

package { 
  $build_essential: 
    ensure => "installed" 
}

$other_makes = ["cmake"]
package {
  $other_makes:
    ensure => "installed"
}
