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

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

This will default to installing the latest version available

* Add changelog fragment

* update changelog
pull/65217/head
Rohit Gohri 5 years ago committed by Felix Fontein
parent eb3da65886
commit 136dc27572

@ -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