Project

General

Profile

Download (488 Bytes) Statistics
| Branch: | Tag: | Revision:
class Features::ForemanDatabase < ForemanMaintain::Feature
FOREMAN_DB_CONFIG = '/etc/foreman/database.yml'.freeze

include ForemanMaintain::Concerns::BaseDatabase

metadata do
label :foreman_database

confine do
file_exists?(FOREMAN_DB_CONFIG)
end
end

def configuration
@configuration || load_configuration
end

private

def load_configuration
config = YAML.load(File.read(FOREMAN_DB_CONFIG))
@configuration = config['production']
end
end
(5-5/14)