Experiments part 23
[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         file { '/etc/pam.d/common-session':
37                 source => 'puppet:///modules/system/etc/pam.d/common-session',
38                 require => Exec['pam_auth_update'],
39         }
40
41         exec { 'systemd-reload':
42                 command => '/bin/systemctl daemon-reload',
43                 refreshonly => true,
44         }
45
46         file { '/etc/systemd/logind.conf':
47                 source => 'puppet:///modules/system/etc/systemd/logind.conf',
48                 notify => Exec['systemd-reload'],
49         }
50
51         package { 'chrony':
52                 ensure => installed,
53         }
54
55         service { 'chrony':
56                 ensure => running,
57                 enable => true,
58                 hasstatus  => false,
59                 hasrestart => true,
60                 require => Package['chrony'],
61         }
62
63         package { 'network-manager':
64                 ensure => installed,
65         }
66
67         file { '/etc/network/interfaces':
68                 ensure => file,
69                 source => 'puppet:///modules/system/etc/network/interfaces',
70                 mode => 'a=r',
71                 require => Package['network-manager'],
72         }
73
74         file { '/etc/NetworkManager/system-connections/ffm.freifunk.net':
75                 ensure => file,
76                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/ffm.freifunk.net',
77                 mode => 'a=,u=r',
78                 require => Package['network-manager'],
79         }
80
81         file { '/etc/NetworkManager/system-connections/wired':
82                 ensure => file,
83                 source => 'puppet:///modules/system/etc/NetworkManager/system-connections/wired',
84                 mode => 'a=,u=r',
85                 require => Package['network-manager'],
86         }
87
88         package { 'wicd*':
89                 ensure => absent,
90                 require => Package['network-manager'],
91         }
92
93 }