generated from linux-system-roles/template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the (re)start logic for the services
We need to start the services in a specific order, e.g. 1. verifier -> 2. registrar -> 3. agent, and in some extra configuration/files are created, such as CA and/or certificates, so a service may take some time before it is ready. Let's now check whether the verifier is accesible -- via its port --, before starting the registrar. Signed-off-by: Sergio Correia <scorreia@redhat.com>
- Loading branch information
1 parent
dac5984
commit b9845bf
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
- name: Restart services | ||
service: | ||
name: "{{ item }}" | ||
state: restarted | ||
loop: "{{ __keylime_server_services }}" | ||
include_tasks: tasks/restart_services.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
|
||
- name: Restart the verifier | ||
service: | ||
name: "{{ __keylime_server_verifier_service }}" | ||
state: restarted | ||
|
||
- name: Make sure the verifier is up and running | ||
ansible.builtin.wait_for: | ||
host: "{{ keylime_server_verifier_ip }}" | ||
port: "{{ keylime_server_verifier_port }}" | ||
|
||
- name: Restart the registrar | ||
service: | ||
name: "{{ __keylime_server_registrar_service }}" | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters