diff --git a/tasks/packages.yml b/tasks/packages.yml index 08e07f5..7bf36f8 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -13,9 +13,9 @@ yum: pkg={{ psql_el_pgdg_packages }} state={{ psql_pkg_state }} - name: Init the db if needed - command: /usr/pgsql-{{ psql_version }}/bin/postgresql-{{ psql_version }}-setup initdb + shell: "/usr/pgsql-{{ psql_version }}/bin/postgresql-{{ psql_version }}-setup" initdb args: - creates: '{{ psql_data_dir }}/postgresql.conf' + creates: '{{ psql_el_data_dir }}/postgresql.conf' when: - not psql_install_scl_version @@ -28,9 +28,9 @@ yum: pkg={{ psql_el_scl_packages }} state={{ psql_pkg_state }} - name: Init the db if needed - command: /opt/rh/rh-postgresql{{ psql_version }}/root/usr/bin/postgresql-setup --initdb + shell: /opt/rh/rh-postgresql{{ psql_version }}/root/usr/bin/postgresql-setup --initdb args: - creates: '{{ psql_data_dir }}/postgresql.conf' + creates: '{{ psql_el_data_dir }}/postgresql.conf' when: - psql_install_scl_version