Add node-checker service

This commit is contained in:
vvzvlad
2025-01-18 13:59:41 +03:00
parent 77a5f1a071
commit da787935df
2 changed files with 220 additions and 0 deletions

View File

@ -264,5 +264,32 @@
# docker update --restart unless-stopped infernet-anvil
# docker update --restart unless-stopped deploy-fluentbit-1
- name: Copy checker service file
ansible.builtin.copy:
dest: /etc/systemd/system/node-checker.service
content: |
[Unit]
Description=Node Checker Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory={{ ansible_env.HOME }}/node
ExecStart=/usr/bin/python3 {{ ansible_env.HOME }}/node/checker.py
Restart=always
RestartSec=1800
[Install]
WantedBy=multi-user.target
mode: '0644'
- name: Enable and start node-checker service
ansible.builtin.systemd:
name: node-checker
enabled: yes
state: started
daemon_reload: yes
- name: Remove docker login credentials
ansible.builtin.shell: rm -rf /root/.docker/config.json