This is just a quick heads-up of a change that is coming, which unfortunately will not be backwards compatible.
As of version 1.2 of ansible-oracle, it is possible to have more than one database running out of an ORACLE_HOME. To make this possible a change had to be made to the structure and code that deals with installation of db software/db creation.
The dictionary structure oracle_databases had to be changed to a list structure, and this means that any config involving the ‘oracle_databases’ structure that was made before v1.2 will stop working.
The affected roles are:
- oraswdb-install
- oradb-create
The defaults will be changed as of the release, but any custom config you have done will have to be changed.
SO what you need to do is this:
In your config the following needs to be changed from this structure:
oracle_databases:
racdb:
oracle_version_db: 12.1.0.2
oracle_edition: EE
oracle_db_name: racdb
oracle_db_passwd: Oracle123
oracle_db_type: RAC
is_container: "false"
pdb_prefix: racpdb
num_pdbs: 2
is_racone: "false"
storage_type: ASM
service_name: racdb_serv
oracle_init_params: "open_cursors=300,processes=700"
oracle_db_mem_percent: 30
oracle_database_type: MULTIPURPOSE
redolog_size_in_mb: 100
delete_db: false
to this structure:
oracle_databases:
- home: racdb
oracle_version_db: 12.1.0.2
oracle_edition: EE
oracle_db_name: racdb
oracle_db_passwd: Oracle123
oracle_db_type: RAC
is_container: "false"
pdb_prefix: racpdb
num_pdbs: 2
is_racone: "false"
storage_type: ASM
service_name: racdb_serv
oracle_init_params: "open_cursors=300,processes=700"
oracle_db_mem_percent: 30
oracle_database_type: MULTIPURPOSE
redolog_size_in_mb: 100
delete_db: false
There is a new parameter ‘home‘ which marks the ‘ending’ directory for the ORACLE_HOME, e.g: /u01/app/oracle/12.1.0.2/racdb
Then you have to line up the rest of the parameters to the ‘home’ one. This is the way yaml works so correct indentation is important.
And if you want to add more database from the same home, and perhaps add a new home with a different (or the same) version, this is what it should look like:
oracle_databases:
- home: racdb <-- original home
oracle_version_db: 12.1.0.2
oracle_edition: EE
oracle_db_name: racdba <-- First database
oracle_db_passwd: Oracle123
oracle_db_type: RAC
is_container: "false"
pdb_prefix: racpdb
num_pdbs: 2
is_racone: "false"
storage_type: ASM
service_name: racdba_serv
oracle_init_params: "open_cursors=300,processes=700"
oracle_db_mem_percent: 30
oracle_database_type: MULTIPURPOSE
redolog_size_in_mb: 100
delete_db: false
- home: racdb <-- original home
oracle_version_db: 12.1.0.2
oracle_edition: EE
oracle_db_name: racdbb <-- second database using the original home
oracle_db_passwd: Oracle123
oracle_db_type: RAC
is_container: "false"
pdb_prefix: racpdb
num_pdbs: 2
is_racone: "false"
storage_type: ASM
service_name: racdbb_serv
oracle_init_params: "open_cursors=300,processes=700"
oracle_db_mem_percent: 30
oracle_database_type: MULTIPURPOSE
redolog_size_in_mb: 100
delete_db: false
- home: blehome <-- new (second) home
oracle_version_db: 11.2.0.4 <-- new version
oracle_edition: EE
oracle_db_name: bledb <-- new db (from the new home)
oracle_db_passwd: Oracle123
oracle_db_type: RAC
is_container: "false"
pdb_prefix: racpdb
num_pdbs: 2
is_racone: "false"
storage_type: ASM
service_name: ble_serv
oracle_init_params: "open_cursors=300,processes=700"
oracle_db_mem_percent: 30
oracle_database_type: MULTIPURPOSE
redolog_size_in_mb: 100
delete_db: false
And that’s pretty much it.
Let me know if anything else is broken.