class Chake::ConfigManager::ItamaeRemote
Public Class Methods
Source
# File lib/chake/config_manager/itamae_remote.rb, line 23 def self.accept?(node) node.data.key?('itamae-remote') end
Public Instance Methods
Source
# File lib/chake/config_manager/itamae_remote.rb, line 15 def apply(config) run_itamae(config) end
Source
# File lib/chake/config_manager/itamae_remote.rb, line 8 def converge recipes = node.data['itamae-remote'] return if recipes.empty? run_itamae(*recipes) end
Source
# File lib/chake/config_manager/itamae_remote.rb, line 19 def needs_upload? true end
Private Instance Methods
Source
# File lib/chake/config_manager/itamae_remote.rb, line 38 def json_config File.join(node.path, Chake.tmpdir, "#{node.hostname}.json") end
Source
# File lib/chake/config_manager/itamae_remote.rb, line 29 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