Skip to content

Commit a1f114f

Browse files
committed
oradb-rman: Some changes from upstream
Some templates were changed from upstream.
1 parent a005f1a commit a1f114f

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

roles/oradb-rman/defaults/main.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,37 @@
11

2+
master_node: true
23
oracle_user: oracle
34
oracle_base: /u01/app/oracle
45

5-
# set rman_cronfile: "" for using the user cron
66
rman_cronfile: oracle_rman_ansible
7-
rman_cron_logdir: /var/log/oracle/rman
7+
rman_cron_logdir: /var/log/oracle/rman/log
8+
9+
rman_script_dir: "{% if item is defined and item.0.rman_script_dir is defined %}{{item.0.rman_script_dir}}{% else %}{{oracle_base}}/rman/{% endif %}"
10+
rman_log_dir: "{% if item is defined and item.0.rman_log_dir is defined %}{{item.0.rman_log_dir}}{% else %}{{oracle_base}}/rman/log/{% endif %}"
11+
12+
rman_tns_admin: /u01/app/oracle/rman/network/admin
13+
rman_wallet_loc: "{{oracle_base}}/rman/network/wallet"
14+
rman_wallet_password: "oracleWallet1"
815

916
rmanautofs: false
1017

18+
rman_cron_mkjob: False
19+
1120
oracle_home_db: "{% if 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 %}{% else %}{% if item.oracle_home is defined %}{{ item.oracle_home }}{% else %}{{ oracle_base }}/{{ item.oracle_version_db }}/{{ item.home }}{% endif %}{% endif %}"
12-
oracle_admin_db: "{% if item.0 is defined %}{{oracle_base}}/admin/{{item.0.oracle_db_name}}{% endif %}"
1321

1422
rman_retention_policy_default: "RECOVERY WINDOW OF 14 DAYS"
1523
rman_channel_disk_default: "'/u10/rmanbackup/%d/%d_%T_%U'"
16-
rman_controlfile_autobackup_disk_default: "'/u10/rmanbackup/%d/%d_%T_%U'"
17-
rman_device_type_disk: 'PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET'
24+
rman_controlfile_autobackup_disk_default: "'/u10/rmanbackup/%d/%d_%F'"
25+
rman_device_type_disk_default: 'PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET'
1826

1927
rman_retention_policy: "{% if item.0.rman_retention_policy is defined %}{{item.0.rman_retention_policy}}{% else %}{{rman_retention_policy_default}}{% endif %}"
2028
rman_channel_disk: "{% if item.0.rman_channel_disk is defined %}{{item.0.rman_channel_disk}}{% else %}{{rman_channel_disk_default}}{% endif %}"
29+
rman_controlfile_autobackup_disk: "{% if item.0.rman_controlfile_autobackup_disk is defined %}{{item.0.rman_controlfile_autobackup_disk}}{% else %}{{rman_controlfile_autobackup_disk_default}}{% endif %}"
2130

2231
rman_service_param: "{% if item.1.service is defined %}--service {{item.1.service}}{% else %}{% endif %}"
32+
33+
check_mk_mkjob: "{% if rman_cron_mkjob %}/usr/bin/mk-job rman_{{item.0.oracle_db_name}}_{{item.1.name}} {% endif %}"
34+
35+
rmanbackuplogdir: "{% if item.0.rman_log_dir is defined %}-l {{item.0.rman_log_dir}}{% else %}{% endif %}"
36+
rmanbackupscriptdir: "{% if item.0.rman_script_dir is defined %}-r {{item.0.rman_script_dir}}{% else %}{% endif %}"
37+
rman_catalog_param: "{% if item.0.rman_wallet is defined and item.0.rman_wallet %}-c /@{{item.0.rman_tnsalias}}{% else %}{% if item.0.rman_user is defined %}-c {{item.0.rman_user}}/{{item.0.rman_password}}@{{item.0.rman_tnsalias}}{% endif %}{% endif %}"

roles/oradb-rman/templates/offline_level0.rman.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ shutdown immediate
1212
startup mount
1313
backup check logical incremental level 0 database filesperset 1;
1414
startup
15-
backup archivelog all not backed up 1 times filesperset 50;
16-
delete noprompt archivelog all backed up 1 times to disk;
1715
delete noprompt obsolete;
1816
}

roles/oradb-rman/templates/parameter.rman.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
#
77
CONFIGURE RETENTION POLICY TO {{rman_retention_policy}};
88
CONFIGURE CONTROLFILE AUTOBACKUP ON;
9-
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk_default}};
9+
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk}};
1010
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
1111
CONFIGURE CHANNEL DEVICE TYPE DISK {{ rman_channel_disk }};

roles/oradb-rman/templates/parameter_fra_disk.rman.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#
77
CONFIGURE RETENTION POLICY TO {{rman_retention_policy}};
88
CONFIGURE CONTROLFILE AUTOBACKUP ON;
9-
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk_default}};
9+
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk}};
1010
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
1111
CONFIGURE CHANNEL DEVICE TYPE DISK clear;
12+
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+{{oracle_dbf_dir_asm}}/{{ item.0.oracle_db_name }}/snapcf_{{ item.0.oracle_db_name }}.f';
13+

roles/oradb-rman/templates/parameter_rac.rman.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
CONFIGURE RETENTION POLICY TO {{rman_retention_policy}};
88
CONFIGURE CONTROLFILE AUTOBACKUP ON;
9-
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk_default}};
9+
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO {{rman_controlfile_autobackup_disk}};
1010
CONFIGURE DEVICE TYPE DISK {{rman_device_type_disk}};
1111
CONFIGURE CHANNEL DEVICE TYPE DISK {{ rman_channel_disk }};
1212
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '{{oracle_dbf_dir_asm}}/%d/snapcf_PLANETP1.f'; # default

0 commit comments

Comments
 (0)