Skip to content

Commit

Permalink
orahost_logrotate: fixes for oravirt#449
Browse files Browse the repository at this point in the history
  • Loading branch information
Rendanic committed Apr 26, 2024
1 parent 401981c commit f7c80e5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/logrotate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- "orahost_logrotate: logrotate setup for oracle files should be optional (oravirt#449)"
13 changes: 9 additions & 4 deletions roles/orahost_logrotate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Configure logrotate for ansible-oracle
- [oracle_home_gi_cl](#oracle_home_gi_cl)
- [oracle_home_gi_so](#oracle_home_gi_so)
- [oracle_trace_cleanup_days](#oracle_trace_cleanup_days)
- [Discovered Tags](#discovered-tags)
- [orahost_logrotate_setup_logrotate](#orahost_logrotate_setup_logrotate)
- [Open Tasks](#open-tasks)
- [Dependencies](#dependencies)
- [License](#license)
Expand Down Expand Up @@ -108,11 +108,16 @@ Define number of days for ADR in Oracle.
oracle_trace_cleanup_days: 7
```
## Discovered Tags
### orahost_logrotate_setup_logrotate
**_cleanup_**
Setup of logrotate/cleanup is optional
#### Default value
```YAML
orahost_logrotate_setup_logrotate: true
```
**_logrotate_**
## Open Tasks
Expand Down
8 changes: 4 additions & 4 deletions roles/orahost_logrotate/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ oracle_home_gi: "{% if _oraswgi_meta_configure_cluster %}{{ oracle_home_gi_cl }}

# @var oracle_cleanup_days:description: >
# Define number of days for oracle_cleanup.sh logfiles and audit files.
# @dev
# @end
oracle_cleanup_days: 14

# @var oracle_trace_cleanup_days:description: >
# Define number of days for ADR in Oracle.
# @dev
# @end
oracle_trace_cleanup_days: 7

# @var logrotate_config:description: >
# Configuration of logrotate definitions.
# @dev
# @end
logrotate_config:
- name: oracle_alert
file: "{{ oracle_base }}/diag/rdbms/*/*/trace/*alert*.log {{ oracle_base }}/diag/asm/*/*/trace/alert*+ASM*.log"
Expand Down Expand Up @@ -45,5 +45,5 @@ logrotate_config:
- rotate 24
- dateext

# @var orahost_logrotate_setup_logrotate: Setup of logrotate/cleanup is optional
# @var orahost_logrotate_setup_logrotate:description: Setup of logrotate/cleanup is optional
orahost_logrotate_setup_logrotate: true
3 changes: 1 addition & 2 deletions roles/orahost_logrotate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# tasks file for orahost-logrotate

- name: Setup logrotate
when: orahost_logrotate_setup_logrotate
block:

- name: Manage logrotate
Expand All @@ -21,5 +22,3 @@
mode: "0744"
when: logrotate_config is defined
tags: cleanup

when: orahost_logrotate_setup_logrotate

0 comments on commit f7c80e5

Please sign in to comment.