From 89c071d374437c8c24dce52a75434dafe90ccd69 Mon Sep 17 00:00:00 2001 From: Philipp Panzer <4118161+yodaaut@users.noreply.github.com> Date: Tue, 25 May 2021 13:28:22 +0200 Subject: [PATCH] detects new versions of ansible-4.0.0+ Ansible has switched dependency between version 3.4.0 (ansible-base) and 4.0.0 (ansible-core), which now outputs new version scheme of "ansible [core 2.11.0]" instead of "ansible 2.10.9". This fix keeps old and new version detection working. --- plugins/provisioners/ansible/provisioner/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/provisioners/ansible/provisioner/base.rb b/plugins/provisioners/ansible/provisioner/base.rb index abe5d08ea..a2533ea9c 100644 --- a/plugins/provisioners/ansible/provisioner/base.rb +++ b/plugins/provisioners/ansible/provisioner/base.rb @@ -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