monitoringpy/tasks/main.yml

58 lines
888 B
YAML

- apt:
name: python3
state: present
update_cache: yes
become: true
- apt:
name: gcc
state: present
become: true
- apt:
name: python3-dev
state: present
become: true
- apt:
name: python3-setuptools
state: present
become: true
- apt:
name: python3-pip
state: present
become: true
- pip:
name: psutil
executable: pip3
become: true
- pip:
name: statsd
executable: pip3
become: true
- git:
repo: 'https://git.keks.cloud/kekskurse/monitoring.py.git'
dest: /opt/monitoring.py
update: yes
become: true
- template:
src: monitoringpy.service.j2
dest: /etc/systemd/system/monitoringpy.service
become: true
- template:
src: config.ini.j2
dest: /opt/monitoring.py/config.ini
become: true
- systemd:
state: restarted
enabled: yes
name: monitoringpy.service
become: true