expect default value of `version` param as None (#35790)

pull/35918/merge
Paweł Krupa 7 years ago committed by Sam Doran
parent 03c73e2bbb
commit 88f1f40aca

@ -154,7 +154,7 @@ def grafana_plugin(module, params):
'changed': False,
'version': grafana_plugin_version}
else:
if params['version'] == 'latest':
if params['version'] == 'latest' or params['version'] is None:
cmd = '{} update {}'.format(grafana_cli, params['name'])
else:
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])
@ -164,7 +164,7 @@ def grafana_plugin(module, params):
'version': grafana_plugin_version}
else:
if 'version' in params:
if params['version'] == 'latest':
if params['version'] == 'latest' or params['version'] is None:
cmd = '{} install {}'.format(grafana_cli, params['name'])
else:
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])

Loading…
Cancel
Save