Skip to content

Commit e3ca4f4

Browse files
committed
New role: oradb-manage-redo. Manage redolog sizes/groups. Uses oracle_redo module from https://github.com/oravirt/ansible-oracle-modules
2 new variables: - redolog_size: 100M (M/G/T) - redolog_groups: 3 e.g oracle_databases: - home: db1 oracle_version_db: 12.2.0.1 oracle_edition: EE oracle_db_name: orclcdb oracle_db_type: RAC redolog_size: 5G redolog_groups: 6
1 parent 7727ea4 commit e3ca4f4

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
configure_cluster: false
2+
oracle_base: /u01/app/oracle
3+
oracle_home_db: "{% if dbh is defined %}{% if dbh.oracle_home is defined %}{{ dbh.oracle_home }}{% else %}{{ oracle_base}}/{{ dbh.oracle_version_db }}/{{ dbh.home }}{% endif %}{% elif item.0 is defined %}{% if item.0.oracle_home is defined %}{{ item.0.oracle_home}}{% else %}{{ oracle_base }}/{{ item.0.oracle_version_db }}/{{ item.0.home }}{% endif %}{% elif item is defined %}{% if item.oracle_home is defined %}{{ item.oracle_home}}{% else %}{{ oracle_base }}/{{ item.oracle_version_db }}/{{ item.home }}{% endif %}{% endif %}"
4+
db_user: system
5+
db_mode: normal
6+
#db_password_cdb: "{% if dbpasswords is defined and dbpasswords[item.cdb] is defined and dbpasswords[item.cdb][db_user] is defined%}{{dbpasswords[item.cdb][db_user]}}{% else %}{{ default_dbpass}}{% endif%}"
7+
db_password_cdb: "{% if dbpasswords is defined and dbpasswords[item.oracle_db_name] is defined and dbpasswords[item.oracle_db_name][db_user] is defined%}{{dbpasswords[item.oracle_db_name][db_user]}}{% else %}{{ default_dbpass}}{% endif%}"
8+
9+
# pdbadmin_user: pdbadmin
10+
# pdbadmin_password: "{% if dbpasswords is defined and dbpasswords[item.cdb] is defined and dbpasswords[item.cdb][item.pdb_name] is defined and dbpasswords[item[1].cdb][item[1].pdb_name][pdbadmin_user] is defined%}{{dbpasswords[item[1].cdb][item[1].pdb_name][pdbadmin_user]}}{% else %}{{ default_dbpass}}{% endif%}"
11+
12+
oracle_env:
13+
ORACLE_HOME: "{{ oracle_home_db }}"
14+
LD_LIBRARY_PATH: "{{ oracle_home_db }}/lib"
15+
16+
# oracle_pdbs:
17+
# - pdb_name: orclpdb
18+
# cdb: orclcdb
19+
# state: present
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
- name: Manage redologs
2+
oracle_redo:
3+
hostname={{ ansible_hostname }}
4+
service_name={{ item.oracle_db_name }}
5+
user={{ db_user }}
6+
password={{ db_password_cdb }}
7+
mode={{ db_mode }}
8+
size={{ item.redolog_size }}
9+
groups={{ item.redolog_groups }}
10+
environment: "{{oracle_env}}"
11+
run_once: "{{ configure_cluster}}"
12+
with_items:
13+
- "{{oracle_databases}}"
14+
when: oracle_databases is defined and item.redolog_size is defined and item.redolog_groups is defined
15+
become_user: "{{ oracle_user }}"
16+
register: param_change
17+
tags: initparams

0 commit comments

Comments
 (0)