lib/testlab/provisioners/apt_cacher_ng.rb in testlab-0.6.9 vs lib/testlab/provisioners/apt_cacher_ng.rb in testlab-0.6.10
- old
+ new
@@ -58,19 +58,19 @@
def on_container_setup(container)
@ui.logger.debug { "APT-CacherNG Provisioner: Container #{container.id}" }
# Ensure the container APT calls use apt-cacher-ng on the node
gateway_ip = container.primary_interface.network.ip
- apt_conf_d_proxy_file = File.join(container.lxc.fs_root, "etc", "apt", "apt.conf.d", "00proxy")
+ apt_conf_d_proxy_file = File.join(container.fs_root, "etc", "apt", "apt.conf.d", "00proxy")
@config[:apt][:cacher_ng] = { :proxy_url => "http://#{gateway_ip}:3142" }.merge(@config[:apt][:cacher_ng])
container.node.ssh.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
- apt_conf_sources_file = File.join(container.lxc.fs_root, "etc", "apt", "sources.list")
+ apt_conf_sources_file = File.join(container.fs_root, "etc", "apt", "sources.list")
container.node.ssh.exec(%(sudo sed -i 's/127.0.0.1:3142\\///g' #{apt_conf_sources_file}))
end
end