aboutsummaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'deployment')
-rw-r--r--deployment/mgagit/manifests/init.pp22
-rw-r--r--deployment/mgagit/manifests/tmpl.pp9
-rw-r--r--deployment/mgagit/templates/group_owned_repo.gl10
3 files changed, 20 insertions, 21 deletions
diff --git a/deployment/mgagit/manifests/init.pp b/deployment/mgagit/manifests/init.pp
index f2002d94..d8912bec 100644
--- a/deployment/mgagit/manifests/init.pp
+++ b/deployment/mgagit/manifests/init.pp
@@ -61,24 +61,14 @@ class mgagit(
content => template('mgagit/repodef_repo.gl'),
}
- $repogroup = 'packagers'
- $repoml = 'soft'
- file { "$gitolite_tmpldir/soft_repo.gl":
- ensure => present,
- owner => root,
- group => root,
- mode => '0644',
- content => template('mgagit/group_owned_repo.gl'),
+ define mgagit::tmpl { 'soft':
+ tmpdir => $gitolite_tmpldir,
+ group => 'packages',
}
- $repogroup = 'web'
- $repoml = 'atelier'
- file { "$gitolite_tmpldir/web_repo.gl":
- ensure => present,
- owner => root,
- group => root,
- mode => '0644',
- content => template('mgagit/group_owned_repo.gl'),
+ define mgagit::tmpl { 'web':
+ tmpdir => $gitolite_tmpldir,
+ ml => 'atelier',
}
file { [$gitolite_dir, $gitolite_keydir, $gitolite_confdir,
diff --git a/deployment/mgagit/manifests/tmpl.pp b/deployment/mgagit/manifests/tmpl.pp
new file mode 100644
index 00000000..3ef10aaa
--- /dev/null
+++ b/deployment/mgagit/manifests/tmpl.pp
@@ -0,0 +1,9 @@
+define mgagit::tmpl($tmpldir, $group = $title, $ml = $title) {
+ file { "$tmpldir/${title}_repo.gl":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => '0644',
+ content => template('mgagit/group_owned_repo.gl'),
+ }
+}
diff --git a/deployment/mgagit/templates/group_owned_repo.gl b/deployment/mgagit/templates/group_owned_repo.gl
index 0e5ae7c1..9187757d 100644
--- a/deployment/mgagit/templates/group_owned_repo.gl
+++ b/deployment/mgagit/templates/group_owned_repo.gl
@@ -5,10 +5,10 @@ repo [% repo %]
RW topic/ = [% maintainer %]
RW refs/tags/ = [% maintainer %]
[% IF r.repos.$repo.lockdown != 'yes' -%]
- RW master$ = @mga-<%= @repogroup %>
- RW distro/ = @mga-<%= @repogroup %>
- RW topic/ = @mga-<%= @repogroup %>
- RW refs/tags/ = @mga-<%= @repogroup %>
+ RW master$ = @mga-<%= @group %>
+ RW distro/ = @mga-<%= @group %>
+ RW topic/ = @mga-<%= @group %>
+ RW refs/tags/ = @mga-<%= @group %>
[% END -%]
RW+ user/USER/ = @all
R = @all
@@ -18,7 +18,7 @@ repo [% repo %]
[% IF r.repos.$repo.mailinglist -%]
config hooks.mailinglist = "[% r.repos.$repo.mailinglist %]"
[% ELSE -%]
- config hooks.mailinglist = "<%= @repoml %>-commits@ml.mageia.org"
+ config hooks.mailinglist = "<%= @ml %>-commits@ml.mageia.org"
[% END -%]
[% END -%]
config hooks.emailprefix = "[% repo %] "