forked from oravirt/ansible-oracle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracting SGA and processes parameters from oracle_databases and ora…
…cle_asm_instance improved
- Loading branch information
Showing
4 changed files
with
35 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
bugfixes: | ||
- "orahost_meta: Applying 'lower' filter to oracle_databases+oracle_asm_instance converts list to string (oravirt#484)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
--- | ||
- name: aggregate_processes | Pick processes parameter | ||
ansible.builtin.set_fact: | ||
__orahost_oracle_database_processes: | | ||
{{ (__orahost_oracle_database.init_parameters | selectattr('name', 'equalto', 'processes'))[0].value }} | ||
- name: aggregate_processes | Sum up processes | ||
ansible.builtin.set_fact: | ||
oracle_databases_processes_sum: | | ||
{{ (oracle_databases_processes_sum | default(0) | int) + (__orahost_oracle_database_processes | int) }} | ||
{{ (oracle_databases_processes_sum | default(0) | int) + (__orahost_oracle_database_processes.value | int) }} | ||
- name: aggregate_processes | Calc max processes | ||
ansible.builtin.set_fact: | ||
oracle_databases_processes_max: >- | ||
{{ [(oracle_databases_processes_max | default(0) | int), (__orahost_oracle_database_processes | int)] | max }} | ||
{{ [(oracle_databases_processes_max | default(0) | int), (__orahost_oracle_database_processes.value | int)] | max }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,10 @@ | ||
--- | ||
- name: aggregate_sgas | Reset __orahost_oracle_database_sga | ||
ansible.builtin.set_fact: | ||
__orahost_oracle_database_sga: "0" | ||
|
||
- name: aggregate_sgas | sga_max_size preceeds sga_target | ||
block: | ||
- name: aggregate_sgas | Derive SGA size from sga_max_size | ||
ansible.builtin.set_fact: | ||
__orahost_oracle_database_sga: | | ||
{{ (__orahost_oracle_database.init_parameters | ||
| selectattr('name','equalto', 'sga_max_size'))[0].value | default(0) | human_to_bytes }} | ||
- name: aggregate_sgas | Derive SGA size from sga_target | ||
ansible.builtin.set_fact: | ||
__orahost_oracle_database_sga: | | ||
{{ (__orahost_oracle_database.init_parameters | ||
| selectattr('name','equalto', 'sga_target'))[0].value | default(0) | human_to_bytes }} | ||
when: | ||
- __orahost_oracle_database_sga == "0" | ||
|
||
- name: aggregate_sgas | Sum up SGAs | ||
ansible.builtin.set_fact: | ||
oracle_databases_sga_sum: | | ||
{{ (oracle_databases_sga_sum | default(0) | int) + (__orahost_oracle_database_sga | int) }} | ||
{{ (oracle_databases_sga_sum | default(0) | int) + (__orahost_oracle_database_sga.value | human_to_bytes | int) }} | ||
- name: aggregate_sgas | Calc max SGA | ||
ansible.builtin.set_fact: | ||
oracle_databases_sga_max: | | ||
{{ [(oracle_databases_sga_max | default(0) | int), (__orahost_oracle_database_sga | int)] | max }}" | ||
{{ [(oracle_databases_sga_max | default(0) | int), (__orahost_oracle_database_sga.value | human_to_bytes | int)] | max }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters