This commit is contained in:
Kekskurse 2019-12-30 17:07:31 +01:00
commit 5ad5d96e07
2 changed files with 53 additions and 0 deletions

35
tasks/main.yml Normal file
View File

@ -0,0 +1,35 @@
- apt:
name: python3
state: present
- apt:
name: python3-dev
state: present
- apt:
name: setuptools
state: present
- apt:
name: python3-pip
state: present
- pip:
name: psutil
- pip:
name: statsd
- git:
repo: 'https://git.keks.cloud/kekskurse/monitoring.py.git'
dest: /opt/monitoring.py
update: no
- template:
src: monitoringpy.service.j2
dest: /etc/systemd/system/monitoringpy.service
- systemd:
state: started
enabled: yes
name: monitoringpy.service

View File

@ -0,0 +1,18 @@
[Unit]
Description=Montiroing.py
After=syslog.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/monitoring.py/
ExecStart=/opt/monitoring.py/run.py
SyslogIdentifier=monitoringpy
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target