Class: Fleetctl::Options

Inherits:
Hashie::Mash
  • Object
show all
Defined in:
lib/fleetctl/options.rb

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



3
4
5
6
# File 'lib/fleetctl/options.rb', line 3

def initialize(*)
  deep_merge!(Hashie::Mash.new(defaults))
  super
end

Instance Method Details

#defaultsObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fleetctl/options.rb', line 8

def defaults
  {
    global: {},
    executable: 'fleetctl',
    logger: Logger.new(STDOUT),
    runner_class: 'SSH',
    command_prefix: nil,
    discovery_url: nil,
    
    # for use with runner_class: 'SSH'
    # these aren't used wih a Shell runner
    fleet_host: nil,
    fleet_user: 'core',
    ssh_options: {},
    remote_temp_dir: '/tmp'
  }
end

#ssh_optionsObject



26
27
28
# File 'lib/fleetctl/options.rb', line 26

def ssh_options
  self[:ssh_options].symbolize_keys
end