/[adm]/puppet/deployment/mgagit/manifests/init.pp
ViewVC logotype

Contents of /puppet/deployment/mgagit/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3323 - (show annotations) (download)
Tue Aug 20 23:51:26 2013 UTC (7 years, 2 months ago) by colin
File size: 2572 byte(s)
mgagit: Fix group name
1 class mgagit(
2 $git_dir = '/git',
3 $ldap_server = 'ldap.mageia.org',
4 $binddn = 'uid=mgagit,ou=People,dc=mageia,dc=org',
5 $vhost = 'projects.mageia.org',
6 $bindpw
7 ){
8 $git_login = 'git'
9 $git_homedir = "/var/lib/${git_login}"
10 $gitolite_dir = "${git_homedir}/.gitolite"
11 $gitolite_keydir = "${gitolite_dir}/keydir"
12 $gitolite_tmpldir = "/etc/mgagit/tmpl"
13 $gitolite_confdir = "${gitolite_dir}/conf"
14 $gitolite_conf = "${gitolite_confdir}/gitolite.conf"
15 $gitoliterc = "$git_homedir/.gitolite.rc"
16 $bindpwfile = '/etc/mgagit.secret'
17 $reposconf_dir = "${git_homedir}/repos-config"
18 $vhostdir = "$git_homedir/www"
19
20 package { ['mgagit', 'gitolite']:
21 ensure => installed,
22 }
23
24 group { $git_login:
25 ensure => present,
26 }
27 user { $git_login:
28 ensure => present,
29 comment => 'Git user',
30 home => $git_homedir,
31 managehome => true,
32 gid => $git_login,
33 }
34
35 file { '/etc/mgagit.conf':
36 ensure => present,
37 owner => root,
38 group => root,
39 mode => '0644',
40 content => template('mgagit/mgagit.conf'),
41 require => Package['mgagit'],
42 }
43
44 file { $gitolite_tmpldir:
45 ensure => directory,
46 owner => root,
47 group => root,
48 mode => '0755',
49 }
50
51 file { "$gitolite_tmpldir/group.gl":
52 ensure => 'link',
53 target => '/usr/share/mgagit/tmpl/group.gl',
54 }
55
56 file { "$gitolite_tmpldir/repodef_repo.gl":
57 ensure => present,
58 owner => root,
59 group => root,
60 mode => '0644',
61 content => template('mgagit/repodef_repo.gl'),
62 }
63
64 mgagit::tmpl { 'soft':
65 tmpldir => $gitolite_tmpldir,
66 group => 'packagers',
67 }
68
69 mgagit::tmpl { 'web':
70 tmpldir => $gitolite_tmpldir,
71 ml => 'atelier',
72 }
73
74 file { [$gitolite_dir, $gitolite_keydir, $gitolite_confdir,
75 $reposconf_dir, $vhostdir]:
76 ensure => directory,
77 owner => $git_login,
78 group => $git_login,
79 mode => '0755',
80 }
81
82 file { $gitoliterc:
83 ensure => present,
84 owner => $git_login,
85 group => $git_login,
86 mode => '0644',
87 content => template('mgagit/gitolite.rc'),
88 }
89
90 file { $bindpwfile:
91 ensure => present,
92 owner => $git_login,
93 group => $git_login,
94 mode => '0600',
95 content => inline_template('<%= @bindpw %>'),
96 }
97
98 file { $git_dir:
99 ensure => directory,
100 owner => $git_login,
101 group => $git_login,
102 mode => '0755',
103 }
104
105 file { "$git_homedir/repositories":
106 ensure => 'link',
107 target => $git_dir,
108 }
109
110 apache::vhost::base { $vhost:
111 location => $vhostdir,
112 }
113 }
114 # vim: sw=2

  ViewVC Help
Powered by ViewVC 1.1.28