Socket
Book a DemoInstallSign in
Socket

sshkit_addon

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sshkit_addon

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

An addon for sshkit

define the sshkit host with hash structure. then define tasks by choosing the host

cap3 = CapBase.new({
  :core1 => { :host => "192.168.5.21", :user => "core", :key => %q(mykey.openssh) },
  :core2 => { :host => "192.168.5.22", :user => "core", :password => 'xxxxx' },
  :core3 => { :host => "192.168.5.22", :user => "core", :password => 'xxxxx' },
})
servers = cap3.servers

desc "run command"
task :run_command, [:cmd] do |t, args|
    cmd = args.cmd
    on servers do |host|
      execute cmd
    end
end

desc "run command on a specific host"
task :run_command_on, [:host_key, :cmd] do |t, args|
    cmd = args.cmd
    on cap3.servers_by_hash[args.host_key] do |host|
      execute cmd
    end
end

FAQs

Package last updated on 24 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.