summaryrefslogtreecommitdiff
path: root/modules/pacman/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pacman/manifests/init.pp')
-rw-r--r--modules/pacman/manifests/init.pp26
1 files changed, 25 insertions, 1 deletions
diff --git a/modules/pacman/manifests/init.pp b/modules/pacman/manifests/init.pp
index eadc1c2..fb23328 100644
--- a/modules/pacman/manifests/init.pp
+++ b/modules/pacman/manifests/init.pp
@@ -1,9 +1,9 @@
class pacman (
String $hooks_path = '/etc/pacman.d/hooks-puppet',
String $conf_path = '/etc/pacman.conf',
+ Boolean $ilovecandy = false,
) {
- # TODO ability to set multiple settings
ini_setting { 'Pacman HookDir':
path => $conf_path,
section => 'options',
@@ -12,9 +12,33 @@ class pacman (
}
+ 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',
+ }
}