Experiments part 14
[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         ]
27   
28         package { $packages:
29                 ensure => installed,
30         }
31
32         package { 'libpam-mount':
33                 ensure => installed,
34         }
35
36         file { '/etc/security/pam_mount.conf.xml':
37                 ensure => file,
38                 source => 'puppet:///modules/system/etc/security/pam_mount.conf.xml',
39                 mode => 'a=r',
40                 require => Package['libpam-mount'],
41         }
42
43         package { 'chrony':
44                 ensure => installed,
45         }
46
47         service { 'chrony':
48                 ensure => running,
49                 enable => true,
50                 hasstatus  => false,
51                 hasrestart => true,
52                 require => Package['chrony'],
53         }
54
55         package { 'network-manager':
56                 ensure => installed,
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 }