]> xn--ix-yja.es Git - alex.git/commitdiff
Add copr type
authoralex <alex@pdp7.net>
Sun, 5 Feb 2023 16:25:33 +0000 (17:25 +0100)
committeralex <alex@pdp7.net>
Sun, 5 Feb 2023 16:26:28 +0000 (17:26 +0100)
personal_infra/puppet/modules/copr/manifests/init.pp [new file with mode: 0644]

diff --git a/personal_infra/puppet/modules/copr/manifests/init.pp b/personal_infra/puppet/modules/copr/manifests/init.pp
new file mode 100644 (file)
index 0000000..2d0474a
--- /dev/null
@@ -0,0 +1,20 @@
+define copr (
+  String[1] $user,
+  String[1] $project = $title,
+  String[1] $dist,
+) {
+  file {"/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:$user:$project.repo":
+    content => @("REPO"/$)
+        [copr:copr.fedorainfracloud.org:$user:$project]
+        name=Copr repo for $project owned by $user
+        baseurl=https://download.copr.fedorainfracloud.org/results/$user/$project/$dist-\$basearch/
+        type=rpm-md
+        skip_if_unavailable=True
+        gpgcheck=1
+        gpgkey=https://download.copr.fedorainfracloud.org/results/$user/$project/pubkey.gpg
+        repo_gpgcheck=0
+        enabled=1
+        enabled_metadata=1
+        | - REPO
+  }
+}