diff --git a/lib/ansible/modules/monitoring/grafana_dashboard.py b/lib/ansible/modules/monitoring/grafana_dashboard.py index 4b4ae9bacc7..67f99e8433a 100644 --- a/lib/ansible/modules/monitoring/grafana_dashboard.py +++ b/lib/ansible/modules/monitoring/grafana_dashboard.py @@ -184,7 +184,7 @@ def get_grafana_version(module, grafana_url, headers): if info['status'] == 200: try: settings = json.loads(r.read()) - grafana_version = string.split(settings['buildInfo']['version'], '.')[0] + grafana_version = settings['buildInfo']['version'].split('.')[0] except Exception as e: raise GrafanaAPIException(e) else: