Skip to content

Commit 58426a5

Browse files
committed
oradb_manage_db: Bugfix listener.ora for multiple Instances on 1 host
This fixes issue #152 . Make sure to use Jinja 2.10 or newer for namespaces.
1 parent b88fc4e commit 58426a5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
bugfixes:
3+
- "oradb_manage_db: Bugfix listener.ora for multiple Instances on 1 host (#275)"

roles/oradb_manage_db/templates/listener_details.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
{%- endif %}
3131

3232
{# config_sid_list is used as a helper. jinja2 doesn't allow the exposing of variables from inside a loop to outside before version 2.10! #}
33-
{%- set config_sid_list = 0 %}
33+
{%- set config_sid_list = namespace(created = False) %}
3434
{# The following loop is executed only once for the header 'SID_LIST_... #}
35-
{%- for testsid in oracle_databases if testsid.listener_name is defined and testsid.listener_name == lsnrinst.listener_name and config_sid_list == 0 %}
36-
{%- set config_sid_list = 1 %}
35+
{%- for testsid in oracle_databases if testsid.listener_name is defined and testsid.listener_name == lsnrinst.listener_name and not config_sid_list.created%}
36+
{%- set config_sid_list.created = True -%}
3737

3838
SID_LIST_{{ lsnrinst.listener_name }} =
3939
(SID_LIST =

0 commit comments

Comments
 (0)