Skip to content

Commit

Permalink
oradb_rman: added option state for cronjobs, disabled is optional now
Browse files Browse the repository at this point in the history
Cronjobs could be removed when state=absent is set.
  • Loading branch information
Rendanic committed Aug 10, 2023
1 parent d148d8c commit 027ca01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/rman_cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- "oradb_rman: added option state for cronjobs, disabled is optional now (oravirt#369)"
10 changes: 7 additions & 3 deletions roles/oradb_rman/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@
name: rman_backup_{{ item.0.oracle_db_name }}_{{ item.1.name }}
cron_file: "{{ rman_cronfile }}"
user: "{{ oracle_user }}"
disabled: "{{ item.1.disabled }}"
disabled: "{{ item.1.disabled | default(false) }}"
state: "{{ item.1.state | default('present') }}"
day: "{{ item.1.day }}"
weekday: "{{ item.1.weekday }}"
hour: "{{ item.1.hour }}"
Expand All @@ -354,10 +355,13 @@
- rman_jobs
- skip_missing: true
loop_control:
label: "oracle_db_name {{ item.0.oracle_db_name | default('') }} job {{ item.1.name | default('') }}"
label: >-
oracle_db_name: {{ item.0.oracle_db_name | default('') }}
job: {{ item.1.name | default('') }}
disabled: {{ item.1.disabled | default(false) }}
state: {{ item.1.state | default('present') }}
when:
- item.1 is defined
- item.1.disabled is defined
- item.1.day is defined
- item.1.weekday is defined
- item.1.hour is defined
Expand Down

0 comments on commit 027ca01

Please sign in to comment.