fix molecule
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-10-26 15:09:33 +02:00
parent f6aae9aae3
commit 35b4561dfb
4 changed files with 17 additions and 2 deletions

View File

@ -68,6 +68,7 @@ postgres_db: []
postgres_db_extra: []
postgres_clean_hba_file: True
postgres_hba_entries:
- contype: local
databases:

View File

@ -35,5 +35,14 @@
- name: Ensure database is initialized
command: "/usr/pgsql-{{ __postgres_version }}/bin/postgresql-{{ __postgres_version }}-setup initdb"
when: not __pgdata_dir_version.stat.exists
- name: Override default pg_hba.conf with a clean one
template:
src: templates/postgresql/data/pg_hba.conf.j2
dest: "{{ __postgres_config_path }}/pg_hba.conf"
mode: 0644
when:
- not __pgdata_dir_version.stat.exists
- postgres_clean_hba_file | bool
become: True
become_user: root

View File

@ -9,7 +9,7 @@
lc_ctype: "{{ item.lc_ctype | default('en_US.UTF-8') }}"
encoding: "{{ item.encoding | default('UTF-8') }}"
template: "{{ item.template | default('template0') }}"
login_host: "{{ item.login_host | default('localhost') }}"
login_host: "{{ item.login_host | default(omit) }}"
login_password: "{{ item.login_password | default(omit) }}"
login_user: "{{ item.login_user | default(postgres_user) }}"
login_unix_socket: "{{ item.login_unix_socket | default(omit) }}"
@ -29,7 +29,7 @@
priv: "{{ item.priv | default(omit) }}"
role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
db: "{{ item.db | default(omit) }}"
login_host: "{{ item.login_host | default('localhost') }}"
login_host: "{{ item.login_host | default(omit) }}"
login_password: "{{ item.login_password | default(omit) }}"
login_user: "{{ item.login_user | default(postgres_user) }}"
login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}"

View File

@ -0,0 +1,5 @@
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# See: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
# TYPE DATABASE USER ADDRESS METHOD