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
|
class pacman (
String $hooks_path = '/etc/pacman.d/hooks-puppet',
String $conf_path = '/etc/pacman.conf',
Boolean $ilovecandy = false,
) {
ini_setting { 'Pacman HookDir':
path => $conf_path,
section => 'options',
setting => 'HookDir',
value => $hooks_path,
}
ini_setting { 'Pacman ILoveCandy':
ensure => if ($ilovecandy) { present } else { absent },
path => '/etc/pacman.conf',
section => 'options',
setting => 'ILoveCandy',
key_val_separator => '',
value => '',
}
if versioncmp($facts['pacman-version'], '6.0.0') >= 0 {
ini_setting { 'Pacman parallel downloads':
path => '/etc/pacman.conf',
section => 'options',
setting => 'ParallelDownloads',
value => 8,
}
}
file { $hooks_path:
ensure => directory,
recurse => true,
purge => true,
}
file { '/etc/pacman.d/mirrorlist':
ensure => present,
backup => true,
source => 'puppet:///modules/pacman/mirrorlist',
}
}
|