lib/testlab/provisioners/apt_cacher_ng.rb in testlab-1.0.1 vs lib/testlab/provisioners/apt_cacher_ng.rb in testlab-1.1.0
- old
+ new
@@ -37,19 +37,19 @@
:exclude_hosts => Array.new
}
}
}
- node.ssh.file(:target => apt_conf_d_proxy_file, :chown => "root:root", :chmod => "0644") do |file|
+ node.file(:target => apt_conf_d_proxy_file, :chown => "root:root", :chmod => "0644") do |file|
file.puts(ZTK::Template.render(apt_conf_d_proxy_file_template, context))
end
- node.ssh.file(:target => apt_cacher_ng_security_conf_file, :chown => "root:root", :chmod => "0644") do |file|
+ node.file(:target => apt_cacher_ng_security_conf_file, :chown => "root:root", :chmod => "0644") do |file|
file.puts(ZTK::Template.render(apt_cacher_ng_security_conf_template, context))
end
- node.ssh.exec(%(sudo service apt-cacher-ng restart))
+ node.exec(%(sudo service apt-cacher-ng restart))
true
end
# APT-CacherNG: Node Deprovision
@@ -73,15 +73,15 @@
# Ensure the container APT calls use apt-cacher-ng on the node
gateway_ip = container.primary_interface.network.ip
@config[:apt][:cacher_ng] = { :proxy_url => "http://#{gateway_ip}:3142" }.merge(@config[:apt][:cacher_ng])
- container.ssh.file(:target => apt_conf_d_proxy_file, :chown => "root:root", :chmod => "0644") do |file|
+ container.file(:target => apt_conf_d_proxy_file, :chown => "root:root", :chmod => "0644") do |file|
file.puts(ZTK::Template.render(apt_conf_d_proxy_file_template, @config))
end
# Fix the APT sources since LXC mudges them when using apt-cacher-ng
- container.ssh.exec(%(sudo sed -i 's/127.0.0.1:3142\\///g' /etc/apt/sources.list))
+ container.exec(%(sudo sed -i 's/127.0.0.1:3142\\///g' /etc/apt/sources.list))
end
private
def apt_conf_d_proxy_file