Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
immerda
Puppet Modules
webhosting
Commits
3ae78f73
Commit
3ae78f73
authored
Jun 11, 2016
by
mh
Browse files
make it possible to also add more options than just the repo to the clone
parent
dd8634e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
manifests/utils/clone.pp
View file @
3ae78f73
...
...
@@ -9,21 +9,23 @@ define webhosting::utils::clone(
){
# create webdir
# for the cloning, $documentroot needs to be absent
git::clone
{
$name
:
git_repo
=>
$git_repo
,
if
$run_mode
==
'fcgid'
{
$req
=
[
User
::
Sftp_only
[
$uid_name
],
User
::
Managed
[
$run_uid_name
]
]
}
else
{
$req
=
User
::
Sftp_only
[
$uid_name
]
}
$default_git_params
=
{
projectroot
=>
$documentroot
,
cloneddir_user
=>
$uid_name
,
cloneddir_group
=>
$gid_name
,
befo
re
=>
File
[
$documentroot
]
,
requi
re
=>
$req
,
}
if
$run_mode
==
'fcgid'
{
Git
::
Clone
[
$name
]{
require
=>
[
User
::
Sftp_only
[
$uid_name
],
User
::
Managed
[
$run_uid_name
]
],
}
if
is_hash
(
$git_repo
)
{
$git_options
=
$git_repo
}
else
{
Git
::
Clone
[
$name
]
{
require
=>
User
::
Sftp_only
[
$uid_name
]
,
$git_options
=
{
git_repo
=>
$git_repo
,
}
}
create_resources
(
'git::clone'
,{
$name
=>
$git_options
},
$default_git_params
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment