Class: Salticid::Gateway
Instance Attribute Summary
Attributes inherited from Host
#env, #groups, #name, #password, #roles, #salticid, #tasks, #user
Instance Method Summary collapse
-
#gateway_tunnel ⇒ Object
Tunnel for connecting to other hosts.
-
#gw ⇒ Object
Gateways don’t need gateways.
-
#initialize(*args) ⇒ Gateway
constructor
A new instance of Gateway.
-
#tunnel ⇒ Object
We don’t need tunnels either.
Methods inherited from Host
#==, #append, #as, #cd, #chmod, #chmod_r, #cwd, #dir?, #download, #escape, #exec!, #exists?, #expand_path, #file?, #ftype, #group, #group?, #homedir, #inspect, #log, #method_missing, #mode, #on_log, #resolve_task, #role, #role?, #role_proxy, #run, #ssh, #sudo, #sudo_upload, #task, #to_s, #to_string, #upload
Constructor Details
#initialize(*args) ⇒ Gateway
Returns a new instance of Gateway.
2 3 4 5 |
# File 'lib/salticid/gateway.rb', line 2 def initialize(*args) @tunnel_lock = Mutex.new super *args end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Salticid::Host
Instance Method Details
#gateway_tunnel ⇒ Object
Tunnel for connecting to other hosts.
12 13 14 15 16 17 18 |
# File 'lib/salticid/gateway.rb', line 12 def gateway_tunnel # Multiple hosts will be asking for this tunnel at the same time. # We need to only create one. @tunnel_lock.synchronize do @gateway_tunnel ||= Net::SSH::Gateway.new(name, user) end end |
#tunnel ⇒ Object
We don’t need tunnels either
21 22 |
# File 'lib/salticid/gateway.rb', line 21 def tunnel end |