diff --git a/plugins/provisioners/ansible/provisioner/base.rb b/plugins/provisioners/ansible/provisioner/base.rb index f0a79f53742..5679ef9e9c7 100644 --- a/plugins/provisioners/ansible/provisioner/base.rb +++ b/plugins/provisioners/ansible/provisioner/base.rb @@ -393,7 +393,7 @@ def set_gathered_ansible_version(stdout_output) _, @gathered_version, _ = ansible_version_pattern.captures @gathered_version.strip! 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