summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-01-05 01:39:07 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-01-05 01:39:07 +0100
commit07d2503184eb1d602ab590a1916105b007bedf35 (patch)
tree610894d5f5cc6a3670c7bba7108374af509e18e1 /manifests
parentworkstation_x remove missing packages. (diff)
downloadprofiles-07d2503184eb1d602ab590a1916105b007bedf35.tar.gz
profiles-07d2503184eb1d602ab590a1916105b007bedf35.tar.xz
Made repo removable.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/repo.pp8
1 files changed, 5 insertions, 3 deletions
diff --git a/manifests/repo.pp b/manifests/repo.pp
index 209046a..aea7e83 100644
--- a/manifests/repo.pp
+++ b/manifests/repo.pp
@@ -1,9 +1,11 @@
# Configure private custom repo for those dists that support it
-class profiles::repo {
+class profiles::repo (
+ Enum['present', 'absent'] $ensure = 'present',
+) {
case $facts['osfamily'] {
'Archlinux': {
pacman::repo { 'adrift-space':
- ensure => present,
+ ensure => $ensure,
server => 'https://repo.adrift.space/arch',
sig_level => 'Optional',
}
@@ -17,7 +19,7 @@ class profiles::repo {
deb-src [trusted=yes] https://repo.adrift.space/debian ${cn} main
| EOF
file { '/etc/apt/sources.list.d/adrift-space.list':
- ensure => 'file',
+ ensure => if $ensure == 'present' { 'file' } else { 'absent' },
content => $content,
}
}