mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-12 09:17:41 +03:00
M #-: add file exist check in Terraform state (#854)
This commit is contained in:
parent
ce6dae6163
commit
5359b5c548
@ -151,9 +151,13 @@ module OneProvision
|
||||
)
|
||||
|
||||
unless s && s.success?
|
||||
@state = File.read("#{tempdir}/terraform.tfstate")
|
||||
conf = Base64.encode64(Zlib::Deflate.deflate(@conf))
|
||||
state = Base64.encode64(Zlib::Deflate.deflate(@state))
|
||||
conf = Base64.encode64(Zlib::Deflate.deflate(@conf))
|
||||
state = ''
|
||||
|
||||
if File.exist?("#{tempdir}/terraform.tfstate")
|
||||
@state = File.read("#{tempdir}/terraform.tfstate")
|
||||
state = Base64.encode64(Zlib::Deflate.deflate(@state))
|
||||
end
|
||||
|
||||
provision.add_tf(state, conf)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user