# parameterized2
class resolver ($mydnsservers = '') {
  $maindnsservers = '8.8.8.8,8.8.4.4'
  if $mydnsservers {
    $dnsservers = split(sprintf("%s,%s",$mydnsservers,$maindnsservers),",")
  } else {
    $dnsservers = split($maindnsservers,",")
  }
  file {'resolver-conf':
    path   => '/tmp/resolv.conf',
   content => template('/root/resolver-conf.erb')
  }
}
class {'resolver':
  mydnsservers => "192.168.1.1,192.168.4.1"
}
