Stes most settings in config.ini.php
This commit is contained in:
parent
2270694130
commit
cccdfde5b7
|
@ -48,11 +48,18 @@ 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:"
|
||||
|
@ -93,8 +100,67 @@ 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
|
||||
|
@ -210,10 +276,10 @@ class wmdeit_piwik(
|
|||
}
|
||||
}
|
||||
|
||||
mysql::db { 'piwikdb':
|
||||
mysql::db { "$piwikdbname":
|
||||
user => "$piwikdbuser",
|
||||
password => "$piwikdbpassword",
|
||||
host => 'localhost',
|
||||
host => "$piwikdbhost",
|
||||
grant => ['ALL'],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue