Merge "Allow specifying repo ref as a class parameter"

This commit is contained in:
Jenkins 2015-08-21 19:12:24 +00:00 committed by Gerrit Code Review
commit 0ae88c3203
1 changed files with 7 additions and 6 deletions

View File

@ -17,24 +17,25 @@
class project_config(
$url,
$revision = 'master',
$base = undef,
) {
$config_dir = Vcsrepo['/etc/project-config']
# Note project_config_ref is expected to be provided by facter
# if you want to use it.
# Note project_config_ref can be provided by facter if you want to use it.
if ($::project_config_ref != undef) {
$revision = $::project_config_ref
} else {
$revision = 'master'
$_revision = $::project_config_ref
}
else {
$_revision = $revision
}
if (!defined($config_dir)) {
vcsrepo { '/etc/project-config':
ensure => latest,
provider => git,
revision => $revision,
revision => $_revision,
source => $url,
}
}