Skip to content

Commit

Permalink
Merge pull request #1145 from ministryofjustice/DBA-813
Browse files Browse the repository at this point in the history
Dba 813
  • Loading branch information
bill-buchan authored Nov 29, 2024
2 parents c0a9f28 + e05faa2 commit 9021bd9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ansible/roles/oracle-oms-setup/tasks/create_jobs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#
# We apply OEM job property files to create these jobs.
#
- name: Check if inside AWS.
uri:
url: http://169.254.169.254/latest/meta-data
timeout: 20
register: aws_uri_check
failed_when: false

- set_fact:
is_aws_environment: "{{ aws_uri_check.status == 200 }}"

- name: Get Job Property Files
ansible.builtin.find:
Expand All @@ -9,6 +18,7 @@
depth: 1
file_type: file
delegate_to: localhost
become: "{{ is_aws_environment | default(true) }}"
register: get_oem_job_property_files
loop: "{{ application_groups.keys() | list + ['common'] }}"
loop_control:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@
# generic and may be applicable to multiple or all applications.
#

- name: Check if inside AWS.
uri:
url: http://169.254.169.254/latest/meta-data
timeout: 20
register: aws_uri_check
failed_when: false

- set_fact:
is_aws_environment: "{{ aws_uri_check.status == 200 }}"

- name: Get Metric Extensions
ansible.builtin.find:
paths: "{{ role_path }}/files/metric_extensions/{{ application_name }}"
recurse: true
depth: 1
file_type: directory
delegate_to: localhost
become: "{{ is_aws_environment | default(true) }}"
register: get_metric_extensions
loop: "{{ application_groups + ['common'] }}"
loop: "{{ application_groups.keys() | list + ['common'] }}"
loop_control:
loop_var: application_name

Expand Down

0 comments on commit 9021bd9

Please sign in to comment.