Class: Tinet::Command::Conf
Instance Method Summary collapse
Methods inherited from Base
Methods included from Shell
Constructor Details
This class inherits a constructor from Tinet::Command::Base
Instance Method Details
#run ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tinet/command/conf.rb', line 6 def run exec_pre_cmd exec_pre_conf nodes.each do |node| node.cmds.each do |cmd| case node.type when :docker sudo "docker exec #{namespaced(node.name)} #{cmd} > /dev/null" when :netns sudo "ip netns exec #{namespaced(node.name)} #{cmd} > /dev/null" end end end exec_post_conf end |