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
6de5b3b9
Commit
6de5b3b9
authored
Dec 09, 2018
by
mh
Browse files
make it possible to have a default contact domain
parent
5eb5e69e
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/user_scripts.pp
View file @
6de5b3b9
# the basics for the user_scripts
class
webhosting::user_scripts
{
class
webhosting::user_scripts
(
$default_contact_domain
=
false
,
)
{
require
::
incron
# common stuff
...
...
manifests/user_scripts/manage.pp
View file @
6de5b3b9
...
...
@@ -21,7 +21,7 @@ define webhosting::user_scripts::manage(
'web_writable'
=>
[],
},
'global'
=>
{
'
default_
contact'
=>
true
,
'contact'
=>
true
,
},
}
$user_scripts_options
=
deep_merge
(
$default_options
,
$options
)
...
...
@@ -39,10 +39,14 @@ define webhosting::user_scripts::manage(
force
=>
true
;
}
if
$user_scripts_options
[
'global'
][
'default_contact'
]
==
true
{
$hosting_contact
=
"security@
${name}
"
}
elsif
$user_scripts_options
[
'global'
][
'default_contact'
]
{
$hosting_contact
=
$user_scripts_options
[
'global'
][
'default_contact'
]
if
$user_scripts_options
[
'global'
][
'contact'
]
==
true
{
if
$webhosting::user_scripts::default_contact_domain
{
$hosting_contact
=
"
${name}
@
${webhosting::user_scripts::default_contact_domain}
"
}
else
{
$hosting_contact
=
"security@
${name}
"
}
}
elsif
$user_scripts_options
[
'global'
][
'contact'
]
{
$hosting_contact
=
$user_scripts_options
[
'global'
][
'contact'
]
}
else
{
$hosting_contact
=
false
}
...
...
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