{# Copyright (C) 2015-2017 Maciej Delmanowski <drybjed@gmail.com>
 # Copyright (C) 2015-2017 DebOps <https://debops.org/>
 # SPDX-License-Identifier: GPL-3.0-only
 #}
{% set postgresql__tpl_server = ansible_local.postgresql.server|d(postgresql__server) %}
{% if (postgresql__register_server|d() and postgresql__register_server.stdout) %}
{%   set postgresql__tpl_server = "localhost" %}
{% endif %}
{
"delegate_to": "{{ ansible_local.postgresql.delegate_to|d(postgresql__delegate_to) }}",
"password_chars": "{{ postgresql__password_characters }}",
"port": "{{ ansible_local.postgresql.port|d(postgresql__port) }}",
"server": "{{ postgresql__tpl_server }}",
"user": "{{ ansible_local.postgresql.user|d(postgresql__user) }}",
"version": "{{ ansible_local.postgresql.version|d(postgresql__version) }}"
}
