[yarn] Set name_version when version is not specified (#62348) (#65213)

* Set name_version when version is not specified, fix #55097

This will default to installing the latest version available

* Add changelog fragment

* update changelog

(cherry picked from commit 136dc27572)
pull/65015/head^2
Felix Fontein 5 years ago committed by Matt Davis
parent 7b3e63de71
commit 0f1e63b236

@ -0,0 +1,3 @@
---
bugfixes:
- yarn - handle no version when installing module by name (https://github.com/ansible/ansible/issues/55097)

@ -183,6 +183,8 @@ class Yarn(object):
if kwargs['version'] and self.name is not None:
self.name_version = self.name + '@' + str(self.version)
elif self.name is not None:
self.name_version = self.name
def _exec(self, args, run_in_check_mode=False, check_rc=True):
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):

Loading…
Cancel
Save