class Chake::ConfigManager::ItamaeRemote
Public Class Methods
accept?(node)
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 20 def self.accept?(node) node.data.key?('itamae-remote') end
Public Instance Methods
apply(config)
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 12 def apply(config) run_itamae(config) end
converge()
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 8 def converge run_itamae(*node.data['itamae-remote']) end
needs_upload?()
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 16 def needs_upload? true end
Private Instance Methods
json_config()
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 35 def json_config File.join(node.path, Chake.tmpdir, "#{node.hostname}.json") end
run_itamae(*recipes)
click to toggle source
# File lib/chake/config_manager/itamae_remote.rb, line 26 def run_itamae(*recipes) cmd = ['itamae', 'local', "--node-json=#{json_config}"] if node.silent cmd << '--log-level=warn' end cmd += recipes.map { |r| File.join(node.path, r) } node.run_as_root(Shellwords.join(cmd)) end