Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oradb_manage_db: support for dbca custom scripts #300

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

talek
Copy link
Contributor

@talek talek commented Nov 20, 2022

It should be possible to deploy all custom scripts defined in a dbca template. With this PR you may define the following section in your dbca template:

<CustomScripts Execute="true"><CustomScript script="{ORACLE_HOME}/assistants/dbca/templates/{{ dbh.oracle_db_name }}_post_install_script.sql"/></CustomScripts>

Then, customscripts variable for the database to be created should point out to the relevant custom scripts defined in the template:

oracle_databases:
  - home: 19c
    oracle_db_name: DUMMYDB
    dbca_templatepath: templates/
    dbca_templatename: dummydb.dbt
    ...
    customscripts:
      - post_install_script.sql
    state: present

All defined custom scripts are copied over to the target remote ORACLE_HOME/assistants/dbca/templates/, from the same dbca_templatepath location. Like the dbca template file, the scripts are staged on the target, prefixed with the name of the database.

@Rendanic Rendanic added this to the 3.3.0 milestone Nov 20, 2022
@Rendanic
Copy link
Collaborator

It took a moment until I understand how this is working.
Great solution - I like it and thanks for the enhancement.

@Rendanic Rendanic merged commit 95c5ae1 into oravirt:master Nov 20, 2022
@talek talek deleted the customscripts branch November 20, 2022 16:58
@Rendanic Rendanic mentioned this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants