Skip to content

Commit

Permalink
Skip ids.storage_file handler when running initial install
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
louise-davies committed Nov 16, 2023
1 parent 30fead5 commit 540b662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
become_user: root
args:
executable: /bin/bash
when: payaraStatus.rc == 0
when: payaraStatus.rc == 0 and (not ids_storage_file_installed is defined or ids_storage_file_installed != true)
6 changes: 6 additions & 0 deletions roles/ids_storage_file/tasks/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
- name: 'Setup ids_storage_file'
include_tasks: handlers/ids_storage_file-handler.yml

# needed to fix CI failing because of the payara restart in ids.storage_file setup script
# can remove when the Payara issue is resolved
- name: "Set temporary fact to indicate ids_storage_file was installed in this play (use this to skip the handler from running again later)"
set_fact:
ids_storage_file_installed: true

- name: 'Set fact on host to record that ids_storage_file has been instantiated'
ini_file:
path: /etc/ansible/facts.d/local.fact
Expand Down

0 comments on commit 540b662

Please sign in to comment.