mirror of
https://github.com/inspec/inspec
synced 2025-02-16 22:18:38 +00:00
configurable paths for postgres + mysql confs
Signed-off-by: Dominik Richter <dominik@vulcanosec.com>
This commit is contained in:
parent
700e2bab26
commit
cc28749adf
2 changed files with 8 additions and 4 deletions
|
@ -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
|
|
@ -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
|
Loading…
Add table
Reference in a new issue