From e849bcd1b0729e432625d6f1d35758dfc20c8c02 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 11 Feb 2011 17:50:01 +0000 Subject: use source instead of templates ( likely lighter, no need to parse the file for no reason ) --- modules/git/files/apply_git_puppet_config.sh | 7 +++++++ modules/git/files/create_git_repo.sh | 11 +++++++++++ modules/git/manifests/init.pp | 12 ++++++------ modules/git/templates/apply_git_puppet_config.sh | 7 ------- modules/git/templates/create_git_repo.sh | 11 ----------- 5 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 modules/git/files/apply_git_puppet_config.sh create mode 100644 modules/git/files/create_git_repo.sh delete mode 100644 modules/git/templates/apply_git_puppet_config.sh delete mode 100644 modules/git/templates/create_git_repo.sh (limited to 'modules') diff --git a/modules/git/files/apply_git_puppet_config.sh b/modules/git/files/apply_git_puppet_config.sh new file mode 100644 index 00000000..29ede998 --- /dev/null +++ b/modules/git/files/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/files/create_git_repo.sh b/modules/git/files/create_git_repo.sh new file mode 100644 index 00000000..1104edbe --- /dev/null +++ b/modules/git/files/create_git_repo.sh @@ -0,0 +1,11 @@ +#!/bin/bash +umask 0002 +# http://eagleas.livejournal.com/18907.html +name="$1" +mkdir -p $name +cd $name +git --bare init --shared=group +chmod g+ws branches info objects refs +( cd objects; chmod g+ws * ) +git config receive.denyNonFastForwards true + diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp index b4e1b6e1..1a3648fd 100644 --- a/modules/git/manifests/init.pp +++ b/modules/git/manifests/init.pp @@ -17,11 +17,11 @@ class git { } file { "/usr/local/bin/create_git_repo.sh": - ensure => present, - owner => root, - group => root, - mode => 755, - content => template('git/create_git_repo.sh') + ensure => present, + owner => root, + group => root, + mode => 755, + source => 'puppet:///modules/git/create_git_repo.sh', } file { "/usr/local/bin/apply_git_puppet_config.sh": @@ -29,7 +29,7 @@ class git { owner => root, group => root, mode => 755, - content => template('git/apply_git_puppet_config.sh') + source => 'puppet:///modules/git/apply_git_puppet_config.sh', } diff --git a/modules/git/templates/apply_git_puppet_config.sh b/modules/git/templates/apply_git_puppet_config.sh deleted file mode 100644 index 29ede998..00000000 --- a/modules/git/templates/apply_git_puppet_config.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/create_git_repo.sh b/modules/git/templates/create_git_repo.sh deleted file mode 100644 index 1104edbe..00000000 --- a/modules/git/templates/create_git_repo.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -umask 0002 -# http://eagleas.livejournal.com/18907.html -name="$1" -mkdir -p $name -cd $name -git --bare init --shared=group -chmod g+ws branches info objects refs -( cd objects; chmod g+ws * ) -git config receive.denyNonFastForwards true - -- cgit v1.2.1