Update playbooks/check-time-sync.yml
This commit is contained in:
@@ -19,7 +19,14 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: ntp_offset.rc != 0
|
failed_when: ntp_offset.rc != 0
|
||||||
|
|
||||||
- name: Extract and display final offset line
|
- name: Try to extract final offset line
|
||||||
|
set_fact:
|
||||||
|
ntp_offset_summary: "{{ ntp_offset.stdout_lines | select('search', 'adjust time') | list | first | default('No offset line found') }}"
|
||||||
|
|
||||||
|
- name: Show full ntpdate output per host
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
[{{ inventory_hostname }}] -> {{ ntp_offset.stdout_lines | select('search', 'adjust time') | list | first | default('No offset reported') }}
|
[{{ inventory_hostname }}]
|
||||||
|
Offset summary: {{ ntp_offset_summary }}
|
||||||
|
Raw output:
|
||||||
|
{{ ntp_offset.stdout_lines | join('\n') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user