Upload facts to temp dir before sudoing them to final location.
This commit is contained in:
parent
bfb66f3166
commit
97a9cd35fc
|
@ -131,7 +131,10 @@ module VagrantPlugins
|
||||||
t = Tempfile.new("vagrant_facts.yaml")
|
t = Tempfile.new("vagrant_facts.yaml")
|
||||||
t.write(config.facter)
|
t.write(config.facter)
|
||||||
t.close()
|
t.close()
|
||||||
@machine.communicate.upload(t.path, @facter_config_path)
|
@machine.communicate.tap do |comm|
|
||||||
|
comm.upload(t.path, File.join(@config.temp_dir, "vagrant_facts.yaml"))
|
||||||
|
comm.sudo("cp #{config.temp_dir}/vagrant_facts.yaml #{@facter_config_path}")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run_puppet_apply
|
run_puppet_apply
|
||||||
|
|
Loading…
Reference in New Issue