feat: add migrate_to_wmt playbook; track hand-crafted playbooks in git

This commit is contained in:
ske087
2026-04-24 16:07:38 +03:00
parent 056f467791
commit ab3ba3fffc
4 changed files with 214 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
- become: true
hosts: all
name: Restart monitoring service
tasks:
- name: Stop prezenta service
systemd:
name: prezenta.service
state: stopped
- name: Wait for service to stop
wait_for:
timeout: 10
- name: Start prezenta service
systemd:
enabled: true
name: prezenta.service
state: started
- name: Verify service is running
register: service_status
systemd:
name: prezenta.service
- name: Report service restart
uri:
body:
device_ip: '{{ ansible_host }}'
hostname: '{{ inventory_hostname }}'
service_status: '{{ service_status.status.ActiveState }}'
body_format: json
method: POST
url: http://{{ ansible_controller_ip }}/api/service_restarted