Skip to content

Commit

Permalink
OHS Base Install - Improve checks on Patch OHS when there are no patc…
Browse files Browse the repository at this point in the history
…hes (#104)

* Update main.yml - change AND condition to OR

Update main.yml - change AND condition to OR

Failed when deploying VM in Jenkins.. despite all molecule tests passing.

* Update main.yml

Add When to Check if Patch applied

* Update main.yml

Improve checks on Patch OHS when there are no patches
  • Loading branch information
martinfanning1 authored Nov 19, 2024
1 parent bd8c0a0 commit d376240
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion roles/ohs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
changed_when: False
ignore_errors: True
loop: "{{ patches }}"
when: ohs_version is defined

- name: Print ohs_version_status
debug:
Expand All @@ -41,7 +42,10 @@

- name: Patch OHS
include_tasks: "patch.yml"
when: ohs_version is defined and ohs_version_status.results | selectattr('rc','greaterthan',0) | list | count > 0
when:
- patches | length > 0
- ohs_version is defined
- ohs_version_status.results | selectattr('rc', 'greaterthan', 0) | list | count > 0

- name: Set up properties file
include_tasks: "config.yml"
Expand Down

0 comments on commit d376240

Please sign in to comment.