Experiments part 21
[inetstation.git] / modules / system / manifests / init.pp
1 class system {
2
3         exec { 'add-architecture-i386':
4                 command => '/usr/bin/dpkg --add-architecture i386',
5                 unless => '/bin/fgrep -q i386 /var/lib/dpkg/arch',
6                 notify => Exec['aptget-update'],
7         }
8
9         exec { 'aptget-update':
10                 command => '/usr/bin/apt-get update',
11                 refreshonly => true,
12         }
13
14         $packages = [
15                 'sudo',
16                 'lsof',
17                 'vim',
18                 'screen',
19                 'rsync',
20                 'tcpdump',
21                 'pv',
22                 'openssh-server',
23                 'locales-all',
24                 'libpam-tmpdir',
25                 'broadcom-sta-dkms',
26                 'firmware-iwlwifi',
27         ]
28   
29         package { $packages:
30                 ensure => installed,
31         }
32
33         include pam
34         include pam::mkhomedir
35
36         package { 'chrony':
37                 ensure => installed,
38         }
39
40         service { 'chrony':
41                 ensure => running,
42                 enable => true,
43                 hasstatus  => false,
44                 hasrestart => true,
45                 require => Package['chrony'],
46         }
47
48         package { 'network-manager':
49                 ensure => installed,
50         }
51
52         file { '/etc/network/interfaces':
53                 ensure => file,
54                 source => 'puppet:///modules/system/etc/network/interfaces',
55                 mode => 'a=r',
56                 require => Package['network-manager'],
57         }
58
59         file { '/etc/NetworkManager/system-connections/ffm.freifunk.net':
60                 ensure => file,
61                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/ffm.freifunk.net',
62                 mode => 'a=,u=r',
63                 require => Package['network-manager'],
64         }
65
66         file { '/etc/NetworkManager/system-connections/wired':
67                 ensure => file,
68                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/wired',
69                 mode => 'a=,u=r',
70                 require => Package['network-manager'],
71         }
72
73         package { 'wicd*':
74                 ensure => absent,
75                 require => Package['network-manager'],
76         }
77
78 }