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

  service { 'gdm':
    ensure  => running,
    require => Package['gdm'],
  }

  exec { '/usr/sbin/dpkg-reconfigure gdm':
    subscribe   => File['/etc/gdm/gdm.conf'],
    user        => root,
    group       => root,
    refreshonly => true,
    require     => Service['gdm'],
  }

  file { '/etc/gdm/gdm.conf':
    ensure => present,
    owner  => root,
    group  => root,
    mode   => 0644,
    source => [ "puppet:///modules/site-nodo/etc/gdm/$domain/gdm.conf",
                "puppet:///modules/nodo/etc/gdm/gdm.conf", ]
  }

  file { '/usr/share/gdm/themes/crunchbang':
    ensure  => directory,
    recurse => true,
    purge   => true,
    force   => true,
    owner   => "root",
    group   => "root",
    # This mode will also apply to files from the source directory
    mode    => 0644,
    # Puppet will automatically set +x for directories
    source  => 'puppet:///modules/nodo/etc/gdm/themes/crunchbang',
  }

  file { '/usr/share/gdm/themes/Tuxtastic':
    ensure  => directory,
    recurse => true,
    purge   => true,
    force   => true,
    owner   => "root",
    group   => "root",
    # This mode will also apply to files from the source directory
    mode    => 0644,
    # Puppet will automatically set +x for directories
    source  => 'puppet:///modules/nodo/etc/gdm/themes/Tuxtastic',
  }

  file { '/usr/share/gdm/themes/dasUberMini':
    ensure  => directory,
    recurse => true,
    purge   => true,
    force   => true,
    owner   => "root",
    group   => "root",
    # This mode will also apply to files from the source directory
    mode    => 0644,
    # Puppet will automatically set +x for directories
    source  => 'puppet:///modules/nodo/etc/gdm/themes/dasUberMini',
  }
}