From a2a5e441d669ab2b5c5d46166890f93a06aa89c8 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Mon, 4 Sep 2023 20:46:27 +0300 Subject: [PATCH] PMM-12420 Fix SQLite to Postgres upgrade. (#2455) * PMM-12420 Fix SQLite to Postgres upgrade. * PMM-12420 Trying to fix ansible script. * PMM-12420 Trying to fix ansible script. * PMM-12420 Trying to fix ansible script. --- .../ansible/playbook/tasks/roles/grafana/tasks/main.yml | 2 +- .../tasks/roles/sqlite-to-postgres/tasks/main.yml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/update/ansible/playbook/tasks/roles/grafana/tasks/main.yml b/update/ansible/playbook/tasks/roles/grafana/tasks/main.yml index a617876a55..e212ed109d 100644 --- a/update/ansible/playbook/tasks/roles/grafana/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/grafana/tasks/main.yml @@ -35,7 +35,7 @@ dest: /etc/grafana/grafana.ini section: database option: type - value: absent + state: absent - name: Remove database host ini_file: diff --git a/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml b/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml index d8f6b90937..7075c490d8 100644 --- a/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml @@ -1,4 +1,12 @@ --- +- name: Wait for grafana to update DB and be ready + ansible.builtin.uri: + url: "http://127.0.0.1:3000/api/health" + status_code: 200 + method: GET + retries: 120 + delay: 1 + - name: Create Grafana backup dir file: path: "/srv/backup/grafana"