mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
M #-: add file exist check in Terraform state (#854)
This commit is contained in:
1 parent
ce6dae6163
commit
5359b5c548
1 file changed
+7
-3
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user