Skip to content

Commit 540b662

Browse files
committed
Skip ids.storage_file handler when running initial install
- The handler still runs in the role, just stops the handler from running again at the end The handler works normally if it's not been installed in the play
1 parent 30fead5 commit 540b662

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

roles/ids_storage_file/handlers/ids_storage_file-handler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
become_user: root
1010
args:
1111
executable: /bin/bash
12-
when: payaraStatus.rc == 0
12+
when: payaraStatus.rc == 0 and (not ids_storage_file_installed is defined or ids_storage_file_installed != true)

roles/ids_storage_file/tasks/installation.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
- name: 'Setup ids_storage_file'
44
include_tasks: handlers/ids_storage_file-handler.yml
55

6+
# needed to fix CI failing because of the payara restart in ids.storage_file setup script
7+
# can remove when the Payara issue is resolved
8+
- name: "Set temporary fact to indicate ids_storage_file was installed in this play (use this to skip the handler from running again later)"
9+
set_fact:
10+
ids_storage_file_installed: true
11+
612
- name: 'Set fact on host to record that ids_storage_file has been instantiated'
713
ini_file:
814
path: /etc/ansible/facts.d/local.fact

0 commit comments

Comments
 (0)