oravirt / ansible-oracle-modules

Oracle modules for Ansible
MIT License
214 stars 159 forks source link

Database links #115

Open tyskjohan opened 4 years ago

tyskjohan commented 4 years ago

Just checking if anyone has looked at managing database links from Ansible?

oravirt commented 4 years ago

I've been meaning to explore this but I literally have no time to do so at the moment.

werner-s-germany commented 4 years ago

actually I use create database link via oracle_sql:

# create dblink is not idempotent, so ignore errors 
- name: create dblink 
  oracle_sql: 
    hostname: "{{ oraclehost }}"
    port: "{{ oracleport }}"
    service_name: "{{ oracleservice }}"
    user: "{{ dblink_owner }}"
    password: "{{ schemapwd_rcsus_sync_std }}"
    sql: "CREATE DATABASE LINK {{ dblink_name }} CONNECT TO {{ remote_dbl_schema }} IDENTIFIED BY {{ schemapwd_remote_dbl_schema }} USING '{{ tns_remote_db }}'"
  environment: "{{ oracle_env }}"
  ignore_errors: true