Created
July 5, 2013 18:03
-
-
Save hakamadare/5936189 to your computer and use it in GitHub Desktop.
first whack at a wrapper for vcsrepo that fixes ownership
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define vcsrepo_git_wrapper( | |
$source, | |
$ensure = 'present', | |
$excludes = false, | |
$force = false, | |
$group = 'root', | |
$identity = '~/.ssh/id_rsa', | |
$owner = 'root', | |
$revision = 'HEAD', | |
$user = 'root', | |
$mode = '0755' | |
) { | |
if $excludes { | |
validate_array($excludes) | |
} | |
vcsrepo { "${title}-vcsrepo": | |
ensure => $ensure, | |
path => $title, | |
source => $source, | |
excludes => $excludes, | |
force => $force, | |
group => $group, | |
identity => $identity, | |
owner => $owner, | |
revision => $revision, | |
user => $user, | |
} | |
file { "${title}-file": | |
ensure => 'directory', | |
path => $title, | |
owner => $owner, | |
group => $group, | |
mode => undef, | |
recurse => true, | |
source => undef, | |
require => Vcsrepo["${title}-vcsrepo"], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment