Method: ServerDefinition.servers

Defined in:
lib/simple_gate/server_definition.rb,
lib/simple_gate/server_definition.rb

.serversHash

Access the pre-configured servers. ~/.servers.yml is parsed for this. An example entry for the servers ‘foobar’ and ‘barfoo’ would look like:

---
foobar:
  address: "127.0.0.1"
  username: "foo"
  password: "bar
  port: 22
barfoo:
  address: "192.168.0.1"
  username: "bar"
  password: "foo
  port: 22

Since the parsed Hash of servers is cached, a value can be stored and the configuration file ignored if desired.

Returns:

  • (Hash)

    Server name to server configuration pairs.



95
96
97
# File 'lib/simple_gate/server_definition.rb', line 95

def servers
  @servers
end