aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-02-28 10:45:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-02-28 10:45:02 -0300
commitc42e7b9e9898338ddaac22aac7984c68cd84e752 (patch)
tree87eb0d72fcce3e00809ba1dbbff8753e245c9127 /manifests/subsystem
parent0be57bbffc9db4370258b7114cf262f38d4f528a (diff)
downloadpuppet-nodo-c42e7b9e9898338ddaac22aac7984c68cd84e752.tar.gz
puppet-nodo-c42e7b9e9898338ddaac22aac7984c68cd84e752.tar.bz2
Feat: nodo::subsystem::apt: new parameters controlling contrib, non-free and non-free-firmware components
Diffstat (limited to 'manifests/subsystem')
-rw-r--r--manifests/subsystem/apt.pp35
1 files changed, 29 insertions, 6 deletions
diff --git a/manifests/subsystem/apt.pp b/manifests/subsystem/apt.pp
index 002f0c1..28db591 100644
--- a/manifests/subsystem/apt.pp
+++ b/manifests/subsystem/apt.pp
@@ -1,10 +1,18 @@
class nodo::subsystem::apt(
- $ensure = present,
- $auto_upgrade = present,
- $upgrade_handler = 'apt',
- $hour = 2,
- $minute = 0,
- $mirror = 'https://deb.debian.org',
+ $ensure = present,
+ $auto_upgrade = present,
+ $upgrade_handler = 'apt',
+ $hour = 2,
+ $minute = 0,
+ $mirror = 'https://deb.debian.org',
+ $contrib = 'enabled',
+ $non_free = 'enabled',
+ $non_free_firmware = $::lsbdistcodename ? {
+ 'wheezy' => 'disabled',
+ 'buster' => 'disabled',
+ 'bullseye' => 'disabled',
+ default => 'enabled',
+ }
) {
package { 'apt-transport-https':
ensure => installed,
@@ -20,6 +28,21 @@ class nodo::subsystem::apt(
content => "Acquire::ForceIPv4 \"true\";\n",
}
+ $contrib_component = $contrib ? {
+ 'enabled' => ' contrib',
+ default => '',
+ }
+
+ $non_free_component = $non_free ? {
+ 'enabled' => ' non-free',
+ default => '',
+ }
+
+ $non_free_firmware_component = $non_free_firmware ? {
+ 'enabled' => ' non-free-firmware',
+ default => '',
+ }
+
file { '/etc/apt/sources.list':
ensure => present,
owner => root,