tests: fix tests on Debian 8

This commit is contained in:
Rene Moser 2016-04-23 22:43:11 +02:00
commit c20d1fced7
6 changed files with 24 additions and 14 deletions

View file

@ -52,15 +52,15 @@
loop_var: postgresql_package_item
when: ansible_pkg_mgr == 'apt'
- name: Initialize postgres (systemd)
- name: Initialize postgres (RedHat systemd)
command: postgresql-setup initdb
when: ansible_distribution == "Fedora" or (ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 7)
- name: Initialize postgres (sysv)
- name: Initialize postgres (RedHat sysv)
command: /sbin/service postgresql initdb
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 6
- name: Iniitalize postgres (upstart)
- name: Iniitalize postgres (Debian)
command: /usr/bin/pg_createcluster {{ pg_ver }} main
# Sometimes package install creates the db cluster, sometimes this step is needed
ignore_errors: True

View file

@ -0,0 +1,10 @@
postgresql_service: "postgresql"
postgresql_packages:
- "postgresql"
- "postgresql-common"
- "python-psycopg2"
pg_hba_location: "/etc/postgresql/9.4/main/pg_hba.conf"
pg_dir: "/var/lib/postgresql/9.4/main"
pg_ver: 9.4