diff options
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 4deaf9a..9b65050 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,6 +9,8 @@ # @param mirrorlist # @param update # Should 'pacman -Sy' be run after changes to the configuration? +# @param include_default +# Should Archlinux' regular repositories be included class pacman ( String $hooks_path = '/etc/pacman.d/hooks-puppet', String $conf_path = '/etc/pacman.conf', @@ -16,6 +18,7 @@ class pacman ( Optional[Integer] $parallel_downloads = undef, String $mirrorlist = "puppet:///modules/${module_name}/mirrorlist", Boolean $update = false, + Boolean $include_default = true, ) { $hooks_ = [$hooks_path] $parallel_downloads_ = if versioncmp($facts['pacman-version'], '6.0.0') != -1 { @@ -24,11 +27,7 @@ class pacman ( false } - concat { $conf_path: - ensure => present, - order => 'numeric', - backup => true, - } + include pacman::setup if $update { exec { 'pacman -Sy': @@ -61,4 +60,10 @@ class pacman ( backup => true, source => $mirrorlist, } + + if $include_default { + pacman::repo { ['core', 'extra', 'community']: + include => '/etc/pacman.d/mirrorlist', + } + } } |