mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
expect default value of version
param as None (#35790)
This commit is contained in:
parent
03c73e2bbb
commit
88f1f40aca
1 changed files with 2 additions and 2 deletions
|
@ -154,7 +154,7 @@ def grafana_plugin(module, params):
|
||||||
'changed': False,
|
'changed': False,
|
||||||
'version': grafana_plugin_version}
|
'version': grafana_plugin_version}
|
||||||
else:
|
else:
|
||||||
if params['version'] == 'latest':
|
if params['version'] == 'latest' or params['version'] is None:
|
||||||
cmd = '{} update {}'.format(grafana_cli, params['name'])
|
cmd = '{} update {}'.format(grafana_cli, params['name'])
|
||||||
else:
|
else:
|
||||||
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])
|
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])
|
||||||
|
@ -164,7 +164,7 @@ def grafana_plugin(module, params):
|
||||||
'version': grafana_plugin_version}
|
'version': grafana_plugin_version}
|
||||||
else:
|
else:
|
||||||
if 'version' in params:
|
if 'version' in params:
|
||||||
if params['version'] == 'latest':
|
if params['version'] == 'latest' or params['version'] is None:
|
||||||
cmd = '{} install {}'.format(grafana_cli, params['name'])
|
cmd = '{} install {}'.format(grafana_cli, params['name'])
|
||||||
else:
|
else:
|
||||||
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])
|
cmd = '{} install {} {}'.format(grafana_cli, params['name'], params['version'])
|
||||||
|
|
Loading…
Reference in a new issue