aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/gdm.pp
blob: 5e4da07b722dbd69af71e21a27425c76b95716a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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',
  }
}

class gdm::disabled inherits gdm {
  File['/usr/share/gdm/themes/dasUberMini', '/usr/share/gdm/themes/Tuxtastic',
       '/usr/share/gdm/themes/crunchbang', '/etc/gdm/gdm.conf' ] {
    ensure => absent,
  }

  Exec['/usr/sbin/dpkg-reconfigure gdm'] {
    ensure => absent,
  }

  Service['gdm'] {
    ensure => stopped,
  }

  Package['gdm'] {
    ensure => absent,
  }
}