class schroot {
  package { 'schroot':
    ensure => installed,
  }

  file { '/etc/schroot/default/fstab':
    ensure  => $ensure,
    owner   => root,
    group   => root,
    mode    => 0644,
    require => Package['schroot'],
    source  => [ "puppet:///modules/site-nodo/etc/schroot/default/$fqdn/fstab",
                 "puppet:///modules/nodo/etc/schroot/default/fstab" ]
  }

  define instance($instance_type = 'plain', $description, $directory, $users, $groups, $aliases, $ensure = present) {
    file { "/etc/schroot/chroot.d/$name":
      ensure  => $ensure,
      owner   => root,
      group   => root,
      mode    => 0644,
      require => Package['schroot'],
      content => template('nodo/schroot/schroot.conf.erb'),
    }
  }
}