Experiments part 18
[inetstation.git] / modules / desktop / manifests / init.pp
1 class desktop {
2
3         package { 'nodm':
4                 ensure => installed,
5         }
6
7         package { 'lxde':
8                 ensure => installed,
9                 require => Package['nodm'],
10         }
11
12         package { 'lightdm':
13                 ensure => absent,
14                 require => Package['lxde'],
15         }
16
17         $packages = [
18                 'iceweasel',
19                 'iceweasel-l10n-*',
20         ]
21   
22         package { $packages:
23                 ensure => installed,
24         }
25
26         group { 'guest':
27                 ensure => 'present'
28         }
29
30         user { 'guest':
31                 ensure => 'present',
32                 home => '/run/user/1001',
33                 # password: guest
34                 password => '$6$pheeghohphaikuka$lJodCaTfZG4IhXw9.htxDsMDAiQrhOsXyJR.nvCdWc2EHgmstkTrpn/8LWi83e9Ac.WFDfzmQ1phpDII/npl/0',
35                 managehome => true,
36                 gid => 'guest',
37                 shell => '/bin/bash',
38                 require => Group['guest'],
39         }
40
41         file { '/etc/default/nodm':
42                 source => 'puppet:///modules/desktop/etc/default/nodm',
43                 require => [
44                                 Package['nodm'],
45                                 User['guest'],
46                                 ],
47         }
48
49         $packages_i386 = [
50                 'libc6:i386',
51                 'libqt4-dbus:i386',
52                 'libqt4-network:i386',
53                 'libqt4-xml:i386',
54                 'libqtcore4:i386',
55                 'libqtgui4:i386',
56                 'libqtwebkit4:i386',
57                 'libstdc++6:i386',
58                 'libx11-6:i386',
59                 'libxext6:i386',
60                 'libxss1:i386',
61                 'libxv1:i386',
62                 'libssl1.0.0:i386',
63                 'libpulse0:i386',
64                 'libasound2-plugins:i386',
65         ]
66
67         package { $packages_i386:
68                 ensure => installed,
69                 subscribe => Exec['add-architecture-i386'],
70         }
71
72         exec { 'download-skype':
73                 command => '/usr/bin/wget -qO/var/cache/.skype-install.deb.part http://www.skype.com/go/getskype-linux-deb && /bin/mv /var/cache/.skype-install.deb.part /var/cache/skype-install.deb',
74                 creates => '/var/cache/skype-install.deb',
75                 notify => Package['skype'],
76         }
77
78         package { 'skype':
79                 provider => dpkg,
80                 ensure => latest,
81                 source => '/var/cache/skype-install.deb',
82         }
83
84         file { '/etc/skel/Desktop':
85                 ensure => directory,
86         }
87
88         file { '/etc/skel/Desktop/skype.desktop':
89                 source => '/usr/share/applications/skype.desktop',
90                 require => [
91                         Package['skype'],
92                         File['/etc/skel/Desktop'],
93                 ],
94         }
95
96
97 }