aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/git/manifests/init.pp21
-rw-r--r--modules/git/templates/apply_git_puppet_config.sh7
-rw-r--r--modules/git/templates/config.puppet0
3 files changed, 28 insertions, 0 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp
index c4847c3b..eab748d4 100644
--- a/modules/git/manifests/init.pp
+++ b/modules/git/manifests/init.pp
@@ -24,6 +24,14 @@ class git {
content => template('git/create_git_repo.sh')
}
+ file { "/usr/local/bin/apply_git_puppet_config.sh":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template('git/apply_git_puppet_config.sh')
+ }
+
# TODO
# define common syntax check, see svn
@@ -65,6 +73,19 @@ class git {
content => $description,
require => File["$name/git-daemon-export-ok"]
}
+
+ file { "$name/config.puppet":
+ ensure => present,
+ require => File["$name/git-daemon-export-ok"],
+ notify => Exec['/usr/local/bin/apply_git_puppet_config.sh'],
+ content => template('git/config.puppet'),
+ }
+
+ exec { "/usr/local/bin/apply_git_puppet_config.sh":
+ cwd => $name,
+ user => "root",
+ refreshonly => true
+ }
}
define svn_repository($source,
diff --git a/modules/git/templates/apply_git_puppet_config.sh b/modules/git/templates/apply_git_puppet_config.sh
new file mode 100644
index 00000000..29ede998
--- /dev/null
+++ b/modules/git/templates/apply_git_puppet_config.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+while read line
+do
+ # --local is a option for the newer git
+ git config --add $line
+done < config.puppet
diff --git a/modules/git/templates/config.puppet b/modules/git/templates/config.puppet
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/git/templates/config.puppet