aboutsummaryrefslogtreecommitdiff
path: root/personal_infra
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-02-05 17:25:33 +0100
committeralex <alex@pdp7.net>2023-02-05 17:26:28 +0100
commit12589777d90151a1cee3e194ac620a1f7cbc6a23 (patch)
tree06a40be564ddadb7399205113adc2110b17bf10f /personal_infra
parent02c7927c6aadf5bd8e26b32d534ac8d68ea33d2a (diff)
Add copr type
Diffstat (limited to 'personal_infra')
-rw-r--r--personal_infra/puppet/modules/copr/manifests/init.pp20
1 files changed, 20 insertions, 0 deletions
diff --git a/personal_infra/puppet/modules/copr/manifests/init.pp b/personal_infra/puppet/modules/copr/manifests/init.pp
new file mode 100644
index 00000000..2d0474a5
--- /dev/null
+++ b/personal_infra/puppet/modules/copr/manifests/init.pp
@@ -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
+ }
+}