diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
commit | d04542e000b8f8fadce45af96d93fb904ca99115 (patch) | |
tree | e85ee2bb0472d9f83f051f31d2629bf4c96bb755 /modules/pacman/manifests/init.pp | |
parent | Setup new site.pp. (diff) | |
parent | Migrate stuff from ansible. (diff) | |
download | webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.gz webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.xz |
Merge branch 'master' of /home/hugo/puppet into production
Diffstat (limited to '')
-rw-r--r-- | modules/pacman/manifests/init.pp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/modules/pacman/manifests/init.pp b/modules/pacman/manifests/init.pp new file mode 100644 index 0000000..fb23328 --- /dev/null +++ b/modules/pacman/manifests/init.pp @@ -0,0 +1,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', + } +} |