configurable paths for postgres + mysql confs

Signed-off-by: Dominik Richter <dominik@vulcanosec.com>
This commit is contained in:
Dominik Richter 2015-08-01 09:38:52 +02:00
parent 700e2bab26
commit cc28749adf
2 changed files with 8 additions and 4 deletions

View file

@ -91,7 +91,9 @@ class MysqlConf < Vulcano::Resource
end
module Serverspec::Type
def mysql_conf
@mysql_conf ||= MysqlConf.new( mysql.conf_path )
def mysql_conf(path = nil)
@mysql_conf ||= {}
dpath = path || mysql.conf_path
@mysql_conf[dpath] ||= MysqlConf.new( dpath )
end
end

View file

@ -64,7 +64,9 @@ end
module Serverspec::Type
def postgres_conf
@postgres_conf ||= PostgresConf.new( postgres.conf_path )
def postgres_conf(path = nil)
@postgres_conf ||= {}
dpath = path || postgres.conf_path
@postgres_conf[dpath] ||= PostgresConf.new( dpath )
end
end