From d03f1db1543359259f6ef85297bd3ccc5d4080f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Garc=C3=ADa?= Date: Thu, 7 Jan 2016 20:30:03 +0100 Subject: [PATCH] Allow any server option, random blowfish and recursive path creation --- manifests/init.pp | 12 ++++++++++++ templates/config.inc.php.erb | 9 +++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 63aedb0..2fb9cbd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,9 +43,21 @@ $servers = [], ) { + exec { "PMA install dir ${path}": + user => 'root', + command => "mkdir -p ${path}", + unless => "test -d ${path}", + path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin'], + logoutput => 'on_failure', + } + + -> + file { $path: ensure => directory, owner => $user, + group => $user, + mode => '0755', } -> diff --git a/templates/config.inc.php.erb b/templates/config.inc.php.erb index a04659d..a2c0c90 100644 --- a/templates/config.inc.php.erb +++ b/templates/config.inc.php.erb @@ -1,11 +1,12 @@ '; $i=0; - <% @servers.each do |server| %> + <% @servers.each do |server| -%> $i++; - $cfg['Servers'][$i]['auth_type'] = 'cookie'; - $cfg['Servers'][$i]['host'] = '<%= server["host"] %>'; + <% server.each do |property, value| -%> + $cfg['Servers'][$i]['<%= property %>'] = '<%= value %>'; + <% end -%> <% end %> ?>