Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions roles/postgresql/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ postgresql_jupyterhub_user: jupyterhub
postgresql_jupyterhub_password: jupyterhub
postgresql_jupyterhub_database: jupyterhub

postgresql_hue_user: hue
postgresql_hue_password: hue
postgresql_hue_database: hue

postgresql_generated_users: >-
Copy link
Contributor

@kpgtek kpgtek Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you use the last commit for modifications? Because for hive_ms, hive schema creation has been removed which is not used by hive application.

If hue does not support schema, you need to add "schema_generated": false option for hue database in postgresql_generated_databases.

[
{%- if groups['ranger_admin'] is defined and groups['ranger_admin'] | length > 0 -%}
Expand All @@ -89,6 +93,9 @@ postgresql_generated_users: >-
{%- if groups['jupyterhub_server'] is defined and groups['jupyterhub_server'] | length > 0 -%}
{ "name": "{{ postgresql_jupyterhub_user }}", "password": "{{ postgresql_jupyterhub_password }}" },
{%- endif -%}
{%- if groups['hue_server'] is defined and groups['hue_server'] | length > 0 -%}
{ "name": "{{ postgresql_hue_user }}", "password": "{{ postgresql_hue_password }}" },
{%- endif -%}
]

postgresql_additional_users: []
Expand All @@ -114,6 +121,9 @@ postgresql_generated_databases: >-
{%- if groups['jupyterhub_server'] is defined and groups['jupyterhub_server'] | length > 0 -%}
{ "name": "{{ postgresql_jupyterhub_database }}", "owner": "{{ postgresql_jupyterhub_user }}", "hba_addresses": [ {% for host in groups['jupyterhub_server'] %}{% if hostvars[host][postgresql_generated_hba_address_hostvars_key] is defined %}"{{ hostvars[host][postgresql_generated_hba_address_hostvars_key] }}/32",{% else %}"",{% endif %}{% endfor %} ] },
{%- endif -%}
{%- if groups['hue_server'] is defined and groups['hue_server'] | length > 0 -%}
{ "name": "{{ postgresql_hue_database }}", "owner": "{{ postgresql_hue_user }}", "hba_addresses": [ {% for host in groups['hue_server'] %}{% if hostvars[host][postgresql_generated_hba_address_hostvars_key] is defined %}"{{ hostvars[host][postgresql_generated_hba_address_hostvars_key] }}/32",{% else %}"",{% endif %}{% endfor %} ] },
{%- endif -%}
]

postgresql_additional_databases: []
Expand Down