-
Notifications
You must be signed in to change notification settings - Fork 0
/
htpc.pp.erb
182 lines (172 loc) · 5.23 KB
/
htpc.pp.erb
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
class {'apt':}
class {'install':
ubuntu => <%= config[:system][:codename] %>,
user => '<%= settings['user'] %>',
group => '<%= settings['group'] %>',
}
package {'unrar':}
package {'smartmontools':}
package {'vlc':}
package {'browser-plugin-vlc':}
package {'vim':}
package {'enca':}
package {'flac':}
package {'shntool':}
package {'cuetools':}
package {'libav-tools':}
package {'lltag':}
package {'mp3gain':}
package {'mkvtoolnix':}
package {'wine':}
package {'wavpack':}
package {'sox':}
package {'mediainfo':}
package {'mpc':}
package {'totem': ensure => absent}
package {'totem-common': ensure => absent}
package {'rhythmbox': ensure => absent}
file {'/usr/bin/gset':
ensure => present,
owner => root,
group => root,
mode => '0755',
source => 'puppet:///modules/install/usr/bin/gset',
}
exec {'disabled-scopes':
command => "/usr/bin/gset com.canonical.Unity.Lenses disabled-scopes \"['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']\"",
user => $install::user,
require => File['/usr/bin/gset'],
}
exec {'button-power':
command => '/usr/bin/gset org.gnome.settings-daemon.plugins.power button-power shutdown',
user => $install::user,
require => File['/usr/bin/gset'],
}
exec {'lock-enabled':
command => '/usr/bin/gset org.gnome.desktop.screensaver lock-enabled false',
user => $install::user,
require => File['/usr/bin/gset'],
}
exec {'idle-activation-enabled':
command => '/usr/bin/gset org.gnome.desktop.screensaver idle-activation-enabled false',
user => $install::user,
require => File['/usr/bin/gset'],
}
exec {'ubuntu-lock-on-suspend':
command => '/usr/bin/gset org.gnome.desktop.screensaver ubuntu-lock-on-suspend false',
user => $install::user,
require => File['/usr/bin/gset'],
}
exec {'idle-delay':
command => '/usr/bin/gset org.gnome.desktop.session idle-delay "uint32 0"',
user => $install::user,
require => File['/usr/bin/gset'],
}
file {'/stuff4': ensure => directory}
file {'/stuff5': ensure => directory}
file {'/stuff6': ensure => directory}
file {'/stuff7': ensure => directory}
file {'/stuff8': ensure => directory}
file {'/stuff9': ensure => directory}
file_line {'tmp':
line => 'tmpfs /tmp tmpfs defaults 0 0',
path => '/etc/fstab',
}
file_line {'stuff4':
line => 'UUID="7f6986f6-6db7-48cd-8323-11b4ff44f818" /stuff4 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
file_line {'stuff5':
line => 'UUID="24d6e340-3d67-492c-9dfb-a48cad740b77" /stuff5 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
file_line {'stuff6':
line => 'UUID="42be6f67-7d6b-4e33-9e15-e8e589e637da" /stuff6 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
file_line {'stuff7':
line => 'UUID="4fb3a239-eb1d-4433-af80-a22baa0b3a88" /stuff7 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
file_line {'stuff8':
line => 'UUID="145751df-f27d-4046-98fb-257b55e4721a" /stuff8 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
file_line {'stuff9':
line => 'UUID="ef91adb1-1eaa-404e-9f2c-39a5f553c9d0" /stuff9 ext4 defaults,noatime 0 2',
path => '/etc/fstab',
}
exec {'/bin/mount -a':
require => [
File['/stuff4'],
File['/stuff5'],
File['/stuff6'],
File['/stuff7'],
File['/stuff8'],
File['/stuff9'],
File_Line['stuff4'],
File_Line['stuff5'],
File_Line['stuff6'],
File_Line['stuff7'],
File_Line['stuff8'],
File_Line['stuff9']
],
}
class {'install::xbmc':
require => Exec['/bin/mount -a'],
}
class {'install::sshd':}
class {'install::mpd':
require => Exec['/bin/mount -a'],
}
class {'install::transmission':
require => Exec['/bin/mount -a'],
}
package {'samba':}
service { 'smbd':
ensure => 'running',
enable => 'true',
require => Package['samba'],
}
file {'/etc/samba/smb.conf':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
content => template('install/etc/samba/smb.conf.htpc.erb'),
require => [
Exec['/bin/mount -a'],
Package['samba']
],
notify => Service['smbd'],
}
package {'avahi-utils':}
file {'/var/lib/plexmediaserver':
ensure => 'link',
target => '/stuff5/.plex',
require => Exec['/bin/mount -a'],
}
# configure: plex_media_server
package {'plexmediaserver':
ensure => latest,
provider => 'dpkg',
source => <%= config[:plex_media_server][:distribution_path] %>,
require => [
Package['avahi-utils'],
File['/var/lib/plexmediaserver']
],
}
service {'plexmediaserver':
ensure => 'running',
enable => 'true',
require => Package['plexmediaserver'],
}
file {'/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml':
ensure => present,
owner => 'plex',
group => 'plex',
mode => '0600',
content => template('install/var/plex/pref.xml.erb'),
require => Package['plexmediaserver'],
notify => Service['plexmediaserver'],
}