-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement: add service debug role to catch and display service errors
Signed-off-by: Christian Krause <[email protected]>
- Loading branch information
1 parent
214f7ed
commit 1204992
Showing
3 changed files
with
39 additions
and
0 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
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,27 @@ | ||
--- | ||
|
||
- name: 'Run `systemctl status {{ __service_name }}`' | ||
ansible.builtin.command: 'systemctl status {{ __service_name }}.service' | ||
changed_when: false | ||
failed_when: false | ||
register: __service_status | ||
|
||
- name: 'Show `systemctl status` output for {{ __service_name }}' | ||
ansible.builtin.debug: | ||
var: __service_status.stdout_lines | ||
changed_when: false | ||
failed_when: false | ||
|
||
- name: 'Run `journalctl -x -u {{ __service_name }}`' | ||
ansible.builtin.command: 'journalctl -x -u {{ __service_name }}.service' | ||
changed_when: false | ||
failed_when: false | ||
register: __service_journal | ||
|
||
- name: 'Show `journalctl -x` output for {{ __service_name }}' | ||
ansible.builtin.debug: | ||
var: __service_journal.stdout_lines | ||
changed_when: false | ||
failed_when: false | ||
|
||
... |
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