Class: Chake::ConfigManager::Shell

Inherits:
Chake::ConfigManager show all
Defined in:
lib/chake/config_manager/shell.rb

Instance Attribute Summary

Attributes inherited from Chake::ConfigManager

#node

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Chake::ConfigManager

all, #bootstrap_steps, get, inherited, init, #initialize, #name, #needs_upload?, #path, priority, short_name, #to_s

Constructor Details

This class inherits a constructor from Chake::ConfigManager

Class Method Details

.accept?(node) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/chake/config_manager/shell.rb', line 16

def self.accept?(node)
  node.data.key?('shell')
end

Instance Method Details

#apply(config) ⇒ Object



12
13
14
# File 'lib/chake/config_manager/shell.rb', line 12

def apply(config)
  node.run_as_root sh(config)
end

#convergeObject



7
8
9
10
# File 'lib/chake/config_manager/shell.rb', line 7

def converge
  commands = node.data['shell'].join(' && ')
  node.run_as_root sh(commands)
end