Merge pull request #12391 from yodaaut/fix_ansible_version_detection

detects new versions of ansible-4.0.0+
This commit is contained in:
Sophia Castellarin 2021-05-26 09:29:13 -05:00 committed by GitHub
commit 7033852da5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -389,7 +389,7 @@ gathered version stdout version:
if ansible_version_pattern
_, @gathered_version, _ = ansible_version_pattern.captures
if @gathered_version
@gathered_version_major = @gathered_version.match(/^(\d)\..+$/).captures[0].to_i
@gathered_version_major = @gathered_version.match(/(\d)\..+$/).captures[0].to_i
end
end
end

View File

@ -325,6 +325,7 @@ VF
"2.5.0.0-rc1": VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0,
"2.x.y.z": VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0,
"4.3.2.1": VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0,
"[core 2.11.0]": VagrantPlugins::Ansible::COMPATIBILITY_MODE_V2_0,
}
valid_versions.each_pair do |ansible_version, mode|
describe "and ansible version #{ansible_version}" do