diff options
-rw-r--r-- | deployment/mgagit/manifests/init.pp | 6 | ||||
-rw-r--r-- | deployment/mgagit/manifests/reposconfig.pp | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/deployment/mgagit/manifests/init.pp b/deployment/mgagit/manifests/init.pp index fdb5f60c..dbff16f8 100644 --- a/deployment/mgagit/manifests/init.pp +++ b/deployment/mgagit/manifests/init.pp @@ -12,6 +12,8 @@ class mgagit( $gitolite_conf = "${gitolite_confdir}/gitolite.conf" $gitoliterc = "$git_homedir/.gitolite.rc" $bindpwfile = '/etc/mgagit.secret' + $reposconf_dir = "${git_homedir}/repos-config" + $reposconf_list = ['software'] package { ['mgagit', 'gitolite']: ensure => installed, @@ -37,7 +39,7 @@ class mgagit( require => Package['mgagit'], } - file { [$gitolite_dir, $gitolite_keydir, $gitolite_confdir]: + file { [$gitolite_dir, $gitolite_keydir, $gitolite_confdir, $reposconf_dir]: ensure => directory, owner => $git_login, group => $git_login, @@ -60,6 +62,8 @@ class mgagit( content => inline_template('<%= @bindpw %>'), } + mgagit::reposconfig { $reposconf_list: } + file { $git_dir: ensure => directory, owner => $git_login, diff --git a/deployment/mgagit/manifests/reposconfig.pp b/deployment/mgagit/manifests/reposconfig.pp new file mode 100644 index 00000000..326f2f88 --- /dev/null +++ b/deployment/mgagit/manifests/reposconfig.pp @@ -0,0 +1,13 @@ +define mgagit::reposconfig { + include mgagit + $giturl = "/git/infrastructure/repositories/${name}.git" + $confdir = "${mgagit::reposconf_dir}/${name}" + + git::snapshot{ $confdir: + source => $giturl, + user => $mgagit::git_login, + refresh => '0', + require => File[$mgagit::reposconf_dir], + } +} +# vim: sw=2 |