class nodo::subsystem::resolver(
  $manage      = hiera('nodo::subsystem::resolver::manage',      false),
  $nameservers = hiera('nodo::subsystem::resolver::nameservers', ''),
  $domain      = hiera('nodo::subsystem::resolver::domain',      $::domain),
  $search      = hiera('nodo::subsystem::resolver::search',      $::fqdn)
) {
  # DNS resolver
  case $manage {
    true: {
      package { 'resolvconf':
        ensure => present,
      }

      file { '/etc/resolv.conf':
        ensure  => '/etc/resolvconf/run/resolv.conf',
        require => Package['resolvconf'],
      }
    }
    default: {
      class { 'resolvconf':
        domain      => $domain,
        search      => $search,
        nameservers => $nameservers,
      }
    }
  }
}