Sha256: aa5d751d1243750a02a071fe9b36ec227636d449b1a1e2e2ae06027bdd4e3c3f
Contents?: true
Size: 396 Bytes
Versions: 6
Compression:
Stored size: 396 Bytes
Contents
module Ops HOSTS_DIR = "hosts" CONTAINERS_DIR = "containers" PROVIDERS_DIR = "providers" DEFAULT_USER = "root" def self.get_user_for(host_name) host_file = "#{HOSTS_DIR}/#{host_name}.yml" if File.exist? host_file params = YAML.load_file host_file if params and params.has_key? "user" return params["user"] end end return DEFAULT_USER end end
Version data entries
6 entries across 6 versions & 1 rubygems