Compare commits
No commits in common. "b9f0a04e9356aa72348ce84f755401b35119a0f1" and "8772bacffbd098f3c655de045efc066feb427416" have entirely different histories.
b9f0a04e93
...
8772bacffb
|
@ -48,18 +48,11 @@ class wmdeit_piwik(
|
|||
$localnginx = true,
|
||||
$localsql = true,
|
||||
$piwikdbuser = "piwik",
|
||||
$piwikdbname = "piwikdb",
|
||||
$piwikdbpassword = "piwik",
|
||||
$piwikdbhost = "localhost",
|
||||
$ssl = false,
|
||||
$piwiksalt = undef,
|
||||
|
||||
|
||||
) inherits wmdeit_piwik::params
|
||||
{
|
||||
|
||||
|
||||
$piwikini = "$wwwdir/piwik/config/config.ini.php"
|
||||
|
||||
if $localnginx {
|
||||
$fpm_listen = "/tmp/fpm"
|
||||
$fpm_type ="unix:"
|
||||
|
@ -100,76 +93,8 @@ class wmdeit_piwik(
|
|||
File[$wwwdir],
|
||||
],
|
||||
creates => "$wwwdir/piwik",
|
||||
} ->
|
||||
file{"$piwikini":
|
||||
ensure => file,
|
||||
owner => $wwwuser
|
||||
} ->
|
||||
ini_setting {"$piwikini proxy":
|
||||
ensure => present,
|
||||
section => "General",
|
||||
path => "$piwikini",
|
||||
setting => "browser_archiving_disabled_enforce",
|
||||
value => "1",
|
||||
}
|
||||
|
||||
if $piwiksalt {
|
||||
ini_setting {"$piwikini salt":
|
||||
ensure => present,
|
||||
section => "General",
|
||||
path => "$piwikini",
|
||||
setting => "salt",
|
||||
value => "\"$piwiksalt\"",
|
||||
require => File["$piwikini"],
|
||||
}
|
||||
}
|
||||
|
||||
ini_setting {"$piwikini dbhost":
|
||||
ensure => present,
|
||||
section => "database",
|
||||
path => "$piwikini",
|
||||
setting => "host",
|
||||
value => "\"$piwikdbhost\"",
|
||||
require => File["$piwikini"],
|
||||
}
|
||||
|
||||
ini_setting {"$piwikini dbname":
|
||||
ensure => present,
|
||||
section => "database",
|
||||
path => "$piwikini",
|
||||
setting => "dbname",
|
||||
value => "\"$piwikdbname\"",
|
||||
require => File["$piwikini"],
|
||||
}
|
||||
|
||||
ini_setting {"$piwikini dbuser":
|
||||
ensure => present,
|
||||
section => "database",
|
||||
path => "$piwikini",
|
||||
setting => "username",
|
||||
value => "\"$piwikdbuser\"",
|
||||
require => File["$piwikini"],
|
||||
}
|
||||
|
||||
ini_setting {"$piwikini dbpass":
|
||||
ensure => present,
|
||||
section => "database",
|
||||
path => "$piwikini",
|
||||
setting => "password",
|
||||
value => "\"$piwikdbpassword\"",
|
||||
require => File["$piwikini"],
|
||||
}
|
||||
|
||||
|
||||
|
||||
if $ssl {
|
||||
$ssl_redirect = true
|
||||
$ssl_port = 443
|
||||
$ssl_key = "/etc/ssl/private/wikimedia.de.key"
|
||||
$ssl_cert = "/etc/ssl/certs/wikimedia.de.chained.pem"
|
||||
}
|
||||
|
||||
|
||||
if $localnginx {
|
||||
|
||||
class {"nginx":
|
||||
|
@ -181,34 +106,28 @@ class wmdeit_piwik(
|
|||
|
||||
}
|
||||
|
||||
# nginx::resource::server { "${domain}_http":
|
||||
# listen_port => 80,
|
||||
# ensure => present,
|
||||
# access_log => "off",
|
||||
# error_log => "off",
|
||||
# server_name => ["$domain"],
|
||||
# server_cfg_append => {
|
||||
# "return" => '301 https://$server_name$request_uri'
|
||||
# }
|
||||
#
|
||||
# }
|
||||
nginx::resource::server { "${domain}_http":
|
||||
listen_port => 80,
|
||||
ensure => present,
|
||||
access_log => "off",
|
||||
error_log => "off",
|
||||
server_name => ["$domain"],
|
||||
server_cfg_append => {
|
||||
"return" => '301 https://$server_name$request_uri'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nginx::resource::server { "$domain":
|
||||
|
||||
ssl_redirect => $ssl,
|
||||
ssl_port => $ssl_port,
|
||||
ssl_key => $ssl_key,
|
||||
ssl_cert => $ssl_cert,
|
||||
|
||||
server_name => ["$domain"],
|
||||
|
||||
# listen_port => 443,
|
||||
listen_port => 443,
|
||||
ensure => present,
|
||||
www_root => "$wwwdir/piwik",
|
||||
access_log => "off",
|
||||
error_log => "off",
|
||||
|
||||
# ssl => true,
|
||||
ssl_cert => "$ssldir/certs/wikimedia.de.chained.pem",
|
||||
ssl_key => "$ssldir/private/wikimedia.de.key",
|
||||
ssl => true,
|
||||
server_cfg_append => {
|
||||
"ssl_session_cache" => "shared:SSL:10m",
|
||||
# " ssl_session_timeout" => "10m;"
|
||||
|
@ -227,8 +146,8 @@ class wmdeit_piwik(
|
|||
nginx::resource::location { "${domain}_x2":
|
||||
ensure => present,
|
||||
server => "$domain",
|
||||
# ssl => true,
|
||||
# ssl_only => true,
|
||||
ssl => true,
|
||||
ssl_only => true,
|
||||
www_root => "$wwwdir/piwik/",
|
||||
location => '~* ^.+\.(?:css|gif|html?|jpe?g|js|png|swf)$',
|
||||
location_cfg_append=> {
|
||||
|
@ -245,8 +164,8 @@ class wmdeit_piwik(
|
|||
nginx::resource::location { "${domain}_root":
|
||||
ensure => present,
|
||||
server => "$domain",
|
||||
# ssl => true,
|
||||
# ssl_only => true,
|
||||
ssl => true,
|
||||
ssl_only => true,
|
||||
www_root => "$wwwdir/piwik/",
|
||||
location => '~ \.php$',
|
||||
index_files => ['index.php', 'index.html', 'index.htm'],
|
||||
|
@ -276,23 +195,13 @@ class wmdeit_piwik(
|
|||
}
|
||||
}
|
||||
|
||||
mysql::db { "$piwikdbname":
|
||||
mysql::db { 'piwikdb':
|
||||
user => "$piwikdbuser",
|
||||
password => "$piwikdbpassword",
|
||||
host => "$piwikdbhost",
|
||||
host => 'localhost',
|
||||
grant => ['ALL'],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cron {"refresh matomo":
|
||||
ensure => present,
|
||||
hour => '*',
|
||||
minute => '*/15',
|
||||
command => "/usr/bin/php $wwwdir/piwik/console core:archive --url https://$domain",
|
||||
user => "$wwwuser"
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ class wmdeit_piwik::params{
|
|||
"$phpver-mysql",
|
||||
"$phpver-mbstring",
|
||||
"$phpver-gd",
|
||||
# "$phpver-dom",
|
||||
# "$phpver-simplexml",
|
||||
"$phpver-dom",
|
||||
"$phpver-simplexml",
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue