Compare commits
No commits in common. "b9f0a04e9356aa72348ce84f755401b35119a0f1" and "8772bacffbd098f3c655de045efc066feb427416" have entirely different histories.
b9f0a04e93
...
8772bacffb
|
@ -48,18 +48,11 @@ class wmdeit_piwik(
|
||||||
$localnginx = true,
|
$localnginx = true,
|
||||||
$localsql = true,
|
$localsql = true,
|
||||||
$piwikdbuser = "piwik",
|
$piwikdbuser = "piwik",
|
||||||
$piwikdbname = "piwikdb",
|
|
||||||
$piwikdbpassword = "piwik",
|
$piwikdbpassword = "piwik",
|
||||||
$piwikdbhost = "localhost",
|
|
||||||
$ssl = false,
|
|
||||||
$piwiksalt = undef,
|
|
||||||
|
|
||||||
) inherits wmdeit_piwik::params
|
) inherits wmdeit_piwik::params
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$piwikini = "$wwwdir/piwik/config/config.ini.php"
|
|
||||||
|
|
||||||
if $localnginx {
|
if $localnginx {
|
||||||
$fpm_listen = "/tmp/fpm"
|
$fpm_listen = "/tmp/fpm"
|
||||||
$fpm_type ="unix:"
|
$fpm_type ="unix:"
|
||||||
|
@ -100,75 +93,7 @@ class wmdeit_piwik(
|
||||||
File[$wwwdir],
|
File[$wwwdir],
|
||||||
],
|
],
|
||||||
creates => "$wwwdir/piwik",
|
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 {
|
if $localnginx {
|
||||||
|
|
||||||
|
@ -181,34 +106,28 @@ class wmdeit_piwik(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# nginx::resource::server { "${domain}_http":
|
nginx::resource::server { "${domain}_http":
|
||||||
# listen_port => 80,
|
listen_port => 80,
|
||||||
# ensure => present,
|
ensure => present,
|
||||||
# access_log => "off",
|
access_log => "off",
|
||||||
# error_log => "off",
|
error_log => "off",
|
||||||
# server_name => ["$domain"],
|
server_name => ["$domain"],
|
||||||
# server_cfg_append => {
|
server_cfg_append => {
|
||||||
# "return" => '301 https://$server_name$request_uri'
|
"return" => '301 https://$server_name$request_uri'
|
||||||
# }
|
}
|
||||||
#
|
|
||||||
# }
|
}
|
||||||
|
|
||||||
nginx::resource::server { "$domain":
|
nginx::resource::server { "$domain":
|
||||||
|
listen_port => 443,
|
||||||
ssl_redirect => $ssl,
|
|
||||||
ssl_port => $ssl_port,
|
|
||||||
ssl_key => $ssl_key,
|
|
||||||
ssl_cert => $ssl_cert,
|
|
||||||
|
|
||||||
server_name => ["$domain"],
|
|
||||||
|
|
||||||
# listen_port => 443,
|
|
||||||
ensure => present,
|
ensure => present,
|
||||||
www_root => "$wwwdir/piwik",
|
www_root => "$wwwdir/piwik",
|
||||||
access_log => "off",
|
access_log => "off",
|
||||||
error_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 => {
|
server_cfg_append => {
|
||||||
"ssl_session_cache" => "shared:SSL:10m",
|
"ssl_session_cache" => "shared:SSL:10m",
|
||||||
# " ssl_session_timeout" => "10m;"
|
# " ssl_session_timeout" => "10m;"
|
||||||
|
@ -227,8 +146,8 @@ class wmdeit_piwik(
|
||||||
nginx::resource::location { "${domain}_x2":
|
nginx::resource::location { "${domain}_x2":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
server => "$domain",
|
server => "$domain",
|
||||||
# ssl => true,
|
ssl => true,
|
||||||
# ssl_only => true,
|
ssl_only => true,
|
||||||
www_root => "$wwwdir/piwik/",
|
www_root => "$wwwdir/piwik/",
|
||||||
location => '~* ^.+\.(?:css|gif|html?|jpe?g|js|png|swf)$',
|
location => '~* ^.+\.(?:css|gif|html?|jpe?g|js|png|swf)$',
|
||||||
location_cfg_append=> {
|
location_cfg_append=> {
|
||||||
|
@ -245,8 +164,8 @@ class wmdeit_piwik(
|
||||||
nginx::resource::location { "${domain}_root":
|
nginx::resource::location { "${domain}_root":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
server => "$domain",
|
server => "$domain",
|
||||||
# ssl => true,
|
ssl => true,
|
||||||
# ssl_only => true,
|
ssl_only => true,
|
||||||
www_root => "$wwwdir/piwik/",
|
www_root => "$wwwdir/piwik/",
|
||||||
location => '~ \.php$',
|
location => '~ \.php$',
|
||||||
index_files => ['index.php', 'index.html', 'index.htm'],
|
index_files => ['index.php', 'index.html', 'index.htm'],
|
||||||
|
@ -276,23 +195,13 @@ class wmdeit_piwik(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql::db { "$piwikdbname":
|
mysql::db { 'piwikdb':
|
||||||
user => "$piwikdbuser",
|
user => "$piwikdbuser",
|
||||||
password => "$piwikdbpassword",
|
password => "$piwikdbpassword",
|
||||||
host => "$piwikdbhost",
|
host => 'localhost',
|
||||||
grant => ['ALL'],
|
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-mysql",
|
||||||
"$phpver-mbstring",
|
"$phpver-mbstring",
|
||||||
"$phpver-gd",
|
"$phpver-gd",
|
||||||
# "$phpver-dom",
|
"$phpver-dom",
|
||||||
# "$phpver-simplexml",
|
"$phpver-simplexml",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue