10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/pullmatic/cli.rb', line 10
def export
set :backend, "ssh"
set :request_pty, true
set :host, options[:host]
ssh_options = {}
ssh_options[:user] = options[:user] if options[:user]
ssh_options[:password] = options[:password] if options[:password]
set :ssh_options, ssh_options
set :sudo_password, options[:sudo_password] if options[:sudo_password]
os = get_os
filesystem = get_filesystem
interface = get_interface
network = get_network
user_group = get_user_group
etc = get_etc
puts Oj.dump({:os => os, :filesystem => filesystem, :interface => interface, :network => network, :user_group => user_group, :etc => etc}, {:indent => 1})
end
|