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
0cbb4c00
Commit
0cbb4c00
authored
Dec 09, 2018
by
mh
Browse files
add some more global options for user scripts
parent
f3d800a8
Changes
12
Hide whitespace changes
Inline
Side-by-side
manifests/common.pp
View file @
0cbb4c00
...
...
@@ -32,6 +32,7 @@ define webhosting::common(
$nagios_check_code
=
'200'
,
$nagios_use
=
'generic-service'
,
$git_repo
=
'absent'
,
$php_installation
=
false
,
){
if
(
$run_gid
==
'absent'
)
{
if
(
$gid
==
'uid'
)
{
...
...
@@ -192,13 +193,27 @@ define webhosting::common(
run_user
=>
$real_run_uid_name
,
}
if
$ensure
!=
'absent'
{
if
$php_installation
and
$php_installation
!=
'system'
{
$php_inst
=
regsubst
(
$php_installation
,
'^scl'
,
'php'
)
require
"::php::scl::
${php_inst}
"
$scl_name
=
getvar
(
"php::scl::
${php_inst}
::scl_name"
)
}
else
{
$scl_name
=
false
}
if
$scl_name
and
!
(
'scl'
in
$user_scripts_options
[
'global'
])
{
$real_user_scripts_options
=
deep_merge
({
'global'
=>
{
'scl'
=>
$scl_name
}
},
$user_scripts_options
)
}
else
{
$real_user_scripts_options
=
$user_scripts_options
}
webhosting::user_scripts::manage
{
$name
:
base_path
=>
$vhost_path
,
scripts
=>
$user_scripts
,
sftp_user
=>
$real_uid_name
,
run_user
=>
$real_run_uid_name
,
web_group
=>
$real_gid_name
,
options
=>
$user_scripts_options
,
options
=>
$
real_
user_scripts_options
,
}
}
if
(
$git_repo
!=
'absent'
)
and
(
$ensure
!=
'absent'
)
{
...
...
manifests/php.pp
View file @
0cbb4c00
...
...
@@ -107,6 +107,7 @@ define webhosting::php(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::standard
{
$name
:
ensure
=>
$ensure
,
...
...
manifests/php/drupal.pp
View file @
0cbb4c00
...
...
@@ -106,6 +106,7 @@ define webhosting::php::drupal(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::drupal
{
$name
:
...
...
manifests/php/joomla.pp
View file @
0cbb4c00
...
...
@@ -102,6 +102,7 @@ define webhosting::php::joomla(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
$path
=
"/var/www/vhosts/
${name}
"
...
...
manifests/php/mediawiki.pp
View file @
0cbb4c00
...
...
@@ -106,6 +106,7 @@ define webhosting::php::mediawiki(
nagios_check_url
=>
$nagios_check_url
,
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
php_installation
=>
$php_installation
,
}
if
$wwwmail
and
(
$contact
!=
'unmanaged'
){
...
...
manifests/php/silverstripe.pp
View file @
0cbb4c00
...
...
@@ -45,6 +45,7 @@ define webhosting::php::silverstripe(
$ssl_mode
=
false
,
$php_settings
=
{},
$php_options
=
{},
$php_installation
=
'system'
,
$vhost_mode
=
'template'
,
$template_partial
=
'absent'
,
$vhost_source
=
'absent'
,
...
...
@@ -104,6 +105,7 @@ define webhosting::php::silverstripe(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::silverstripe
{
$name
:
...
...
manifests/php/simplemachine.pp
View file @
0cbb4c00
...
...
@@ -45,6 +45,7 @@ define webhosting::php::simplemachine(
$ssl_mode
=
false
,
$php_settings
=
{},
$php_options
=
{},
$php_installation
=
'system'
,
$vhost_mode
=
'template'
,
$template_partial
=
'absent'
,
$vhost_source
=
'absent'
,
...
...
@@ -101,6 +102,7 @@ define webhosting::php::simplemachine(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
$path
=
"/var/www/vhosts/
${name}
"
...
...
manifests/php/spip.pp
View file @
0cbb4c00
...
...
@@ -32,6 +32,7 @@ define webhosting::php::spip(
$run_uid_name
=
'absent'
,
$run_gid
=
'absent'
,
$run_gid_name
=
'absent'
,
$php_installation
=
'system'
,
$watch_adjust_webfiles
=
'absent'
,
$user_scripts
=
'absent'
,
$user_scripts_options
=
{},
...
...
@@ -101,6 +102,7 @@ define webhosting::php::spip(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::spip
{
$name
:
...
...
manifests/php/typo3.pp
View file @
0cbb4c00
...
...
@@ -105,6 +105,7 @@ define webhosting::php::typo3(
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
git_repo
=>
$git_repo
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::typo3
{
$name
:
...
...
manifests/php/wordpress.pp
View file @
0cbb4c00
...
...
@@ -105,6 +105,7 @@ define webhosting::php::wordpress(
nagios_check_url
=>
$nagios_check_url
,
nagios_check_code
=>
$nagios_check_code
,
nagios_use
=>
$nagios_use
,
php_installation
=>
$php_installation
,
}
apache::vhost::php::wordpress
{
$name
:
...
...
manifests/user_scripts/manage.pp
View file @
0cbb4c00
...
...
@@ -20,6 +20,9 @@ define webhosting::user_scripts::manage(
'only_webreadable'
=>
[],
'web_writable'
=>
[],
},
'global'
=>
{
'default_contact'
=>
true
,
},
}
$user_scripts_options
=
merge
(
$default_options
,
$options
)
...
...
@@ -36,6 +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'
]
}
else
{
$hosting_contact
=
false
}
file
{
"
${scripts_path}
/vhost.options"
:
content
=>
template
(
'webhosting/user_scripts/vhost.options.erb'
),
owner
=>
root
,
...
...
templates/user_scripts/vhost.options.erb
View file @
0cbb4c00
...
...
@@ -2,3 +2,9 @@ sftp_user: <%= @sftp_user %>
run_user:
<%=
@run_user
%>
group:
<%=
@web_group
%>
webdir:
<%=
@base_path
%>
/www
<%
if
@hosting_contact
-%>
hosting_contact:
<%=
@hosting_contact
%>
<%
end
-%>
<%
if
@user_scripts_options
[
'global'
][
'scl'
]
-%>
scl:
<%=
@user_scripts_options
[
'global'
][
'scl'
]
%>
<%
end
-%>
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