1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

M #-: fix minor bug in Google provider (#1678)

This commit is contained in:
Alejandro Huertas Herrero 2022-01-03 11:31:56 +01:00 committed by GitHub
parent 411b9484c9
commit 7c74c031ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -66,7 +66,11 @@ module OneProvision
# Checks ansible installed version
def check_ansible_version
version = Gem::Version.new(`ansible --version`.split[1])
# Get just first line with Ansible version
version = `ansible --version`.split("\n")[0]
version = version.match(/\d+[.]\d+[.]\d+/)
version = Gem::Version.new(version)
if (version < ANSIBLE_VERSION[0]) ||
(version >= ANSIBLE_VERSION[1])

View File

@ -20,4 +20,6 @@ resource "google_compute_firewall" "device_<%= obj['ID'] %>" {
protocol = "udp"
ports = ["8472"]
}
source_ranges = ["0.0.0.0/0"]
}