diff --git a/ansible/roles/oracle-oms-setup/defaults/main.yml b/ansible/roles/oracle-oms-setup/defaults/main.yml index baa4037cb..6c7ba03c5 100644 --- a/ansible/roles/oracle-oms-setup/defaults/main.yml +++ b/ansible/roles/oracle-oms-setup/defaults/main.yml @@ -40,12 +40,12 @@ application_groups: - nomis - oasys - corporate-staff-rostering + - nomis-combined-reporting - hmpps-oem probation: - delius - delius-mis - iaps - - hmpps-oem emctl: "{{ oem_agent_base }}/agent_inst/bin/emctl" diff --git a/ansible/roles/oracle-oms-setup/tasks/create_jobs.yml b/ansible/roles/oracle-oms-setup/tasks/create_jobs.yml index c128caaa0..b5729d2a3 100644 --- a/ansible/roles/oracle-oms-setup/tasks/create_jobs.yml +++ b/ansible/roles/oracle-oms-setup/tasks/create_jobs.yml @@ -33,6 +33,14 @@ owner: oracle group: oinstall + - name: Flatten Application Groups Dictionary + set_fact: + application_groups_flatten: | + {% for application_group in application_groups -%} + {{ application_group }}:{% for application in application_groups[application_group] -%}{{ application }}{%if not loop.last %},{% else %}|{% endif %} + {%- endfor %} + {%- endfor %} + - name: Template OEM Job Property Files ansible.builtin.template: src: "{{ oem_job }}" @@ -45,8 +53,8 @@ loop_var: oem_job vars: oem_hostname: "{{ ansible_hostname }}" - job_name: "Backup Report for Delius" - reported_applications: "delius,hmpps-oem" + job_name: "Backup Report" + reported_applications: "{{ application_groups_flatten | regex_replace('\\n','')}}" - name: Create Jobs from OEM Property Files become_user: oracle diff --git a/ansible/roles/oracle-oms-setup/templates/jobs/common/send_backup_report.j2 b/ansible/roles/oracle-oms-setup/templates/jobs/common/send_backup_report.j2 index dfe55ed97..56bd887be 100644 --- a/ansible/roles/oracle-oms-setup/templates/jobs/common/send_backup_report.j2 +++ b/ansible/roles/oracle-oms-setup/templates/jobs/common/send_backup_report.j2 @@ -222,15 +222,16 @@ variable.large_os_script=<