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

[pull] master from oravirt:master #44

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/oracle_db_mem_totalmb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
breaking_changes:
- "orasw_meta: added assert for oracle_db_mem_totalmb in oracle_databases (oravirt#414)"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ oracle_database_db1:
# Example custom DBCA-Template, usable for CDB and nonCDB
# dbca_templatename: 19c_custom_dbca.dbt
storage_type: FS # Database storage to be used. ASM or FS.
oracle_db_mem_totalmb: 1024 # Amount of RAM to be used for SGA
oracle_database_type: MULTIPURPOSE # MULTIPURPOSE|DATA_WAREHOUSING|OLTP
redolog_size: 75M
redolog_groups: 3
Expand Down Expand Up @@ -50,8 +49,8 @@ oracle_database_db1:
# - {name: use_large_pages ,value: 'ONLY', scope: spfile, state: present}
- {name: log_archive_dest_1, value: 'location=USE_DB_RECOVERY_FILE_DEST', scope: both, state: present}
- {name: log_buffer, value: '64M', scope: spfile, state: present}
- {name: pga_aggregate_target, value: '200M', scope: both, state: present, dbca: false}
- {name: sga_target, value: '1800M', scope: spfile, state: present, dbca: false}
- {name: pga_aggregate_target, value: '200M', scope: both, state: present}
- {name: sga_target, value: '1800M', scope: spfile, state: present}
- {name: recyclebin, value: 'off', scope: spfile, state: present}
- {name: standby_file_management, value: 'AUTO', scope: both, state: present}
- {name: streams_pool_size, value: '152M', scope: spfile, state: present}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ oracle_databases:
# Example custom DBCA-Template, usable for CDB and nonCDB
# dbca_templatename: 19c_custom_dbca.dbt
storage_type: FS
oracle_db_mem_totalmb: 2048 # this value is only valid during dbca - init.ora-parameters are used afterwards.
oracle_database_type: MULTIPURPOSE
redolog_size: 50M
redolog_groups: 3
Expand Down Expand Up @@ -72,8 +71,8 @@ oracle_databases:
- {name: log_archive_dest_1, value: 'location=USE_DB_RECOVERY_FILE_DEST', scope: both, state: present}
- {name: log_buffer, value: '64M', scope: spfile, state: present}
# - {name: pga_aggregate_target, value: '1024M', scope: both, state: present, dbca: false}
- {name: pga_aggregate_target, value: '1G', scope: both, state: present, dbca: false}
- {name: sga_target, value: '3096M', scope: spfile, state: present, dbca: false}
- {name: pga_aggregate_target, value: '1G', scope: both, state: present}
- {name: sga_target, value: '3096M', scope: spfile, state: present}
- {name: recyclebin, value: 'off', scope: spfile, state: present}
- {name: streams_pool_size, value: '152M', scope: spfile, state: present}
# "_cursor_obsolete_threshold" for 12.2+
Expand Down
1 change: 1 addition & 0 deletions extensions/molecule/dbfs/side_effect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@
state: present
init_parameters:
- {name: recyclebin, value: 'off', scope: spfile, state: present}
- {name: sga_target, value: '1808M', scope: spfile, state: present}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ oracle_databases:
oracle_db_type: SI
is_container: true
storage_type: FS
oracle_db_mem_totalmb: 1024
oracle_database_type: MULTIPURPOSE
redolog_size: 50M
redolog_groups: 3
Expand Down Expand Up @@ -121,7 +120,7 @@ oracle_databases:
- {name: db_create_online_log_dest_1, value: '/u01/app/oracle/oradata', scope: both, state: present}
- {name: recyclebin, value: 'off', scope: spfile, state: present}
- {name: pga_aggregate_target, value: '128M', scope: both, state: present}
- {name: sga_target, value: '1808M', scope: spfile, state: present, dbca: false}
- {name: sga_target, value: '1808M', scope: spfile, state: present}

oracle_pdbs:
- cdb: DB1
Expand Down
14 changes: 13 additions & 1 deletion roles/orasw_meta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ There are a lot of variables who are used by `orasw_meta`
- [oracle_sw_patches](#oracle_sw_patches)
- [oracle_sw_source_local](#oracle_sw_source_local)
- [oracle_sw_source_www](#oracle_sw_source_www)
- [orasw_meta_assert_oracle_databases](#orasw_meta_assert_oracle_databases)
- [shell_aliases](#shell_aliases)
- [shell_ps1](#shell_ps1)
- [Discovered Tags](#discovered-tags)
Expand Down Expand Up @@ -446,7 +447,6 @@ oracle_databases:
oracle_db_type: SI
is_container: true
storage_type: FS
oracle_db_mem_totalmb: 1024
oracle_database_type: MULTIPURPOSE
redolog_size: 100M
redolog_groups: 3
Expand Down Expand Up @@ -848,6 +848,18 @@ server during software installation and patching.
oracle_sw_source_www: http://www/orasw
```

### orasw_meta_assert_oracle_databases

Switch for enable/disable assert on `oracle_databases`.

Please change the state only when really needed!

#### Default value

```YAML
orasw_meta_assert_oracle_databases: true
```

### shell_aliases

Define shell Aliases for oracle user.
Expand Down
8 changes: 7 additions & 1 deletion roles/orasw_meta/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ oracle_ee_options_213:
# oracle_db_type: SI
# is_container: true
# storage_type: FS
# oracle_db_mem_totalmb: 1024
# oracle_database_type: MULTIPURPOSE
# redolog_size: 100M
# redolog_groups: 3
Expand Down Expand Up @@ -599,3 +598,10 @@ default_dbpass: >-
# PDBADMIN: Oracle_789
# @end
dbpasswords: {}

# @var orasw_meta_assert_oracle_databases:description: >
# Switch for enable/disable assert on `oracle_databases`.
#
# Please change the state only when really needed!
# @end
orasw_meta_assert_oracle_databases: true
18 changes: 18 additions & 0 deletions roles/orasw_meta/tasks/assert_oracle_databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,16 @@
when:
- db_homes_installed is defined

- name: Check switch for orasw_meta_assert_oracle_databases
ansible.builtin.debug:
msg: >-
WARNING!!! Assert for oracle_databases has been disabled!
when:
- not orasw_meta_assert_oracle_databases | bool

- name: assert oracle_databases
when:
- orasw_meta_assert_oracle_databases | bool
block:
- name: assert oracle_databases
ansible.builtin.assert:
Expand All @@ -95,6 +104,15 @@
- ass_odb.users | default([]) | type_debug == 'list'
- ass_odb.oracle_db_type | default('SI2') in ('SI', 'RAC', 'RACONENODE')
- ass_odb.storage_type | default('FS') in ('FS', 'ASM')
- (ass_odb.oracle_db_mem_totalmb is defined
and ass_odb.init_parameters | default([])
| selectattr ('name', 'match', 'sga_target') | list | length == 0
)
or
(ass_odb.oracle_db_mem_totalmb is not defined
and ass_odb.init_parameters | default([]) | list
| selectattr ('name', 'match', 'sga_target') | list | length > 0
)
with_items:
- "{{ oracle_databases }}"
loop_control:
Expand Down
Loading