Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
masbr_job_data_list: "{{ masbr_job_data_list | default([], true) }}"

- name: "Set fact: specified backup data"
when: masbr_backup_data is defined and masbr_backup_data | length > 0
when:
- masbr_backup_data is defined
- masbr_backup_data | length > 0
- (_ignore_masbr_backup_data is not defined) or (_ignore_masbr_backup_data is defined and not _ignore_masbr_backup_data)
block:
- name: "Set fact: reset masbr_job_data_specified"
set_fact:
Expand Down
1 change: 1 addition & 0 deletions ibm/mas_devops/roles/db2/tasks/backup/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- name: "Before run tasks"
include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/before_run_tasks.yml"
vars:
_ignore_masbr_backup_data: true
_job_type: "backup"
_component_before_task_path: "{{ role_path }}/tasks/before-backup-restore.yml"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- name: "Before run tasks"
include_tasks: "{{ role_path }}/../../common_tasks/backup_restore/before_run_tasks.yml"
vars:
_ignore_masbr_backup_data: true
_job_type: "backup"
_component_before_task_path: "{{ role_path }}/tasks/providers/{{ mongodb_provider }}/before-backup-restore.yml"

Expand Down
11 changes: 11 additions & 0 deletions ibm/mas_devops/roles/suite_app_backup_restore/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ masbr_action: "{{ lookup('env', 'MASBR_ACTION') }}"
# Manage PVC paths to backup/restore, format: "<pvcName>:<mountPath>/<subPath>" separated by commas
# For example: "pvc-docs:/doclinks/attachments,pvc-maxlogs:/maxlogs"
masbr_manage_pvc_paths: "{{ lookup('env', 'MASBR_MANAGE_PVC_PATHS') | default('', true) }}"

# Backup/Restore - Supported job types per app
# https://ibm-mas.github.io/ansible-devops/roles/suite_app_backup_restore/#masbr_backup_data
# https://ibm-mas.github.io/ansible-devops/roles/suite_app_backup_restore/#masbr_restore_data
supported_job_data_item_types:
health: ["namespace", "wsl"]
iot: ["namespace"]
manage: ["namespace", "pv"]
monitor: ["namespace"]
optimizer: ["namespace"]
visualinspection: ["namespace", pv]
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
loop: "{{ masbr_job_data_list }}"
loop_control:
loop_var: job_data_item
when: job_data_item.type in supported_job_data_item_types[mas_app_id]

rescue:
# Update job status: Failed
Expand Down
3 changes: 3 additions & 0 deletions ibm/mas_devops/roles/suite_backup_restore/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
masbr_action: "{{ lookup('env', 'MASBR_ACTION') }}"
mas_instance_id: "{{ lookup('env', 'MAS_INSTANCE_ID') }}"

# Backup/Restore - Supported job types
supported_job_data_item_types: ["namespace"]
1 change: 1 addition & 0 deletions ibm/mas_devops/roles/suite_backup_restore/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
loop: "{{ masbr_job_data_list }}"
loop_control:
loop_var: job_data_item
when: job_data_item.type in supported_job_data_item_types

rescue:
# Update job status: Failed
Expand Down
Loading