mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
expect default value of version param as None (#35790)
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user