Defined Type: tp::source
- Defined in:
- manifests/source.pp
Overview
Makes a git clone of the repository of the given app or of what’s has been specified in the $source paramater
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'manifests/source.pp', line 25
define tp::source (
Variant[Boolean,String] $ensure = present,
Variant[Undef,String] $path = undef,
Variant[Undef,String] $source = undef,
Variant[Undef,String] $app = $title,
Hash $my_settings = {},
Hash $vcsrepo_options = {},
String[1] $data_module = 'tinydata',
String[1] $destination_dir = '/opt/src',
) {
# Settings evaluation
$tp_settings=tp_lookup($title,'settings',$data_module,'deep_merge')
$settings = $tp_settings + $my_settings
$real_source = pick_default($source,getvar('settings.urls.source'),getvar('settings.git_source'))
if $real_source {
tp::dir { "${app} source":
ensure => $ensure,
path => pick($path, $settings[git_destination], "${destination_dir}/${app}"),
source => $real_source,
vcsrepo => 'git',
vcsrepo_options => $vcsrepo_options,
}
}
}
|