Module: Beaker::DSL::PEClientTools::ConfigFileHelper

Included in:
Beaker::DSL::PE
Defined in:
lib/beaker-pe/pe-client-tools/config_file_helper.rb

Defined Under Namespace

Classes: Private

Instance Method Summary collapse

Instance Method Details

#write_client_tool_config_on(host, config_level, tool, contents) ⇒ Object

Helper method to write config files for pe-client-tools

Parameters:

  • host (Beaker::Host)

    The beaker host that gets the config file

  • config_level (String)

    'user' or 'global'

  • tool (String)

    'access', 'code', 'db', 'query', 'orchestrator', 'job', 'app'

  • contents (String)

    The contents of the config file


13
14
15
16
17
18
19
# File 'lib/beaker-pe/pe-client-tools/config_file_helper.rb', line 13

def write_client_tool_config_on(host, config_level, tool, contents)

  # TODO take a hash and parse file or take literal string

  file = "#{Private.config_path(host, config_level)}/#{Private.file_name(tool)}"
  create_remote_file(host, file, contents)
end