From b7ccda8f5912ce64616bd113d41acf8d2d804fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 5 Mar 2020 17:00:21 +0100 Subject: [PATCH] retrace: do not init pg twice --- roles/abrt/faf-pre/tasks/setup_db.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/roles/abrt/faf-pre/tasks/setup_db.yml b/roles/abrt/faf-pre/tasks/setup_db.yml index 45a3fb6eba..39a0fc3f04 100644 --- a/roles/abrt/faf-pre/tasks/setup_db.yml +++ b/roles/abrt/faf-pre/tasks/setup_db.yml @@ -1,8 +1,6 @@ --- - name: Ensure PostgreSQL database is initialized. - command: "initdb --no-locale -D /var/lib/pgsql/data" - become: true - become_user: "postgres" + command: "postgresql-setup --initdb --unit postgresql" args: creates: "/var/lib/pgsql/data/PG_VERSION" @@ -76,16 +74,6 @@ state: absent when: faf_recreate_database|bool -- name: check postgresql initdb - stat: - path: /var/lib/pgsql/initdb.log - register: st - -- name: initdb postgresql - command: postgresql-setup initdb - when: st.stat.exists == False - become: true - - name: start service postgresql service: name: postgresql