Define reprepro distributions
authorJan Dittberner <jandd@cacert.org>
Fri, 2 Aug 2019 07:21:12 +0000 (09:21 +0200)
committerJan Dittberner <jandd@cacert.org>
Fri, 2 Aug 2019 07:21:12 +0000 (09:21 +0200)
sitemodules/profiles/manifests/debarchive.pp

index 914864f..5d77d0f 100644 (file)
@@ -191,4 +191,47 @@ class profiles::debarchive (
     mode   => '0600',
     source => 'puppet:///modules/profiles/debarchive/cacert-keyring.gpg',
   }
+
+  # setup reprepro
+  file { $package_dir:
+    ensure => directory,
+    owner  => 'debarchive',
+    group  => 'nogroup',
+    mode   => '0755',
+  }
+  file { "${package_dir}/conf":
+    ensure => directory,
+    owner  => 'debarchive',
+    group  => 'nogroup',
+    mode   => '0700',
+  }
+
+  concat { "${package_dir}/conf/distributions":
+    ensure  => 'file',
+    owner   => 'debarchive',
+    group   => 'nogroup',
+    mode    => '0600',
+  }
+
+  concat::fragment { 'stretch-distribution':
+    target  => "${package_dir}/conf/distributions":
+    content => join([
+      'Origin: CAcert Infrastructure Team',
+      'Codename: stretch/cacert',
+      'Architectures: amd64 source',
+      'Components: main',
+      '',
+      ''], "\n"),
+  }
+
+  content::fragment { 'buster-distribution':
+    target  => "${package_dir}/conf/distributions":
+    content => join([
+      'Origin: CAcert Infrastructure Team',
+      'Codename: buster/cacert',
+      'Architectures: amd64 source',
+      'Components: main',
+      '',
+      ''], "\n"),
+  }
 }