Added software packages.
[inetstation.git] / modules / system / manifests / init.pp
1 class system {
2
3         include apt
4
5         class { 'apt':
6                 purge => [
7                         'sources.list',
8                         'sources.list.d',
9                         'preferences',
10                         'preferences.d',
11                 ],
12                 sources => {
13                         'debian' => {
14                                 location => 'http://ftp.de.debian.org/debian/',
15                                 release => "${lsbdistcodename}",
16                                 repos => 'main non-free contrib',
17                         },
18                         'debian-security' => {
19                                 location => 'http://security.debian.org/',
20                                 release => "${lsbdistcodename}-updates",
21                                 repos => 'main non-free contrib',
22                         },
23                         'debian-volatile' => {
24                                 location => 'http://ftp.de.debian.org/debian/',
25                                 release => "${lsbdistcodename}-updates",
26                                 repos => 'main non-free contrib',
27                         },
28                 update => {
29                         frequency => 'always',
30                 },
31         }
32         
33
34         exec { 'add-architecture-i386':
35                 command => '/usr/bin/dpkg --add-architecture i386',
36                 unless => '/bin/fgrep -q i386 /var/lib/dpkg/arch',
37                 notify => Exec['apt_update'],
38         }
39
40         exec { 'aptget-update':
41                 command => '/usr/bin/apt-get update',
42                 refreshonly => true,
43         }
44
45         $packages = [
46                 'sudo',
47                 'lsof',
48                 'vim',
49                 'screen',
50                 'rsync',
51                 'tcpdump',
52                 'pv',
53                 'openssh-server',
54                 'locales-all',
55                 'libpam-tmpdir',
56                 'broadcom-sta-dkms',
57                 'firmware-iwlwifi',
58         ]
59   
60         package { $packages:
61                 ensure => installed,
62         }
63
64         include pam
65         include pam::mkhomedir
66
67         file { '/etc/pam.d/common-session':
68                 source => 'puppet:///modules/system/etc/pam.d/common-session',
69                 require => Exec['pam_auth_update'],
70         }
71
72         exec { 'systemd-reload':
73                 command => '/bin/systemctl daemon-reload',
74                 refreshonly => true,
75         }
76
77         file { '/etc/systemd/logind.conf':
78                 source => 'puppet:///modules/system/etc/systemd/logind.conf',
79                 notify => Exec['systemd-reload'],
80         }
81
82         package { 'chrony':
83                 ensure => installed,
84         }
85
86         service { 'chrony':
87                 ensure => running,
88                 enable => true,
89                 hasstatus  => false,
90                 hasrestart => true,
91                 require => Package['chrony'],
92         }
93
94         package { 'network-manager':
95                 ensure => installed,
96         }
97
98         file { '/etc/network/interfaces':
99                 ensure => file,
100                 source => 'puppet:///modules/system/etc/network/interfaces',
101                 mode => 'a=r',
102                 require => Package['network-manager'],
103         }
104
105         file { '/etc/NetworkManager/system-connections/ffm.freifunk.net':
106                 ensure => file,
107                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/ffm.freifunk.net',
108                 mode => 'a=,u=r',
109                 require => Package['network-manager'],
110         }
111
112         file { '/etc/NetworkManager/system-connections/wired':
113                 ensure => file,
114                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/wired',
115                 mode => 'a=,u=r',
116                 require => Package['network-manager'],
117         }
118
119         package { 'wicd*':
120                 ensure => absent,
121                 require => Package['network-manager'],
122         }
123
124 }