Skip to content

Commit b4f4e47

Browse files
committed
oradb_manage_db: Added support for aliasnames for Oracle Wallet
Example: oracle_tnsnames_config: orclpdb: alias: - orclpdb_dbsnmp - orclpdb_checkmk connect: ... tnsnames.ora: ORCLPDB, ORCLPDB_DBSNMP, ORCLPDB_CHECKMK = (DESCRIPTION =
1 parent 860b29a commit b4f4e47

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- "oradb_manage_db: Added support for aliasnames for Oracle Wallet ()"

extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ oracle_pdbs:
146146

147147
_tnsnames_config_pdb_helper:
148148
- key: "{{ oracle_pdbs[0]['pdb_name'] }}"
149+
alias:
150+
- "{{ oracle_pdbs[0]['pdb_name'] }}_SYSTEM"
149151
value:
150152
connect:
151153
service_name: "{{ oracle_pdbs[0]['pdb_name'] }}"

roles/oradb_manage_db/templates/tnsnames.ora.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ SALES=
1616

1717
# do not edit the configuration manually.
1818
# The execution of ansible-oracle automatically replace all manual changes!
19-
{{ tnsinst.tnsname | upper }} =
19+
{% if oracle_tnsnames_config[tnsinst.tnsname]['alias'] is defined -%}
20+
{{ tnsinst.tnsname | upper }}, {{ oracle_tnsnames_config[tnsinst.tnsname]['alias'] | join(', ') | upper }}
21+
{%- else %}
22+
{{ tnsinst.tnsname | upper }}
23+
{%- endif %} =
2024
(DESCRIPTION =
2125
(FAILOVER={{ oracle_tnsnames_config[tnsinst.tnsname]['failover'] | default('yes')}})
2226
(CONNECT_TIMEOUT={{ oracle_tnsnames_config[tnsinst.tnsname]['connect_timeout'] | default('5')}})

0 commit comments

Comments
 (0)