dns_resolver role, update-dns script, dns-deploy playbook, inventory updates
This commit is contained in:
parent
152edb8345
commit
1509daad4c
26 changed files with 780 additions and 176 deletions
49
roles/pve_exporter/tasks/main.yml
Normal file
49
roles/pve_exporter/tasks/main.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
- name: pip installieren
|
||||
apt:
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: pve_exporter installieren
|
||||
pip:
|
||||
name: prometheus-pve-exporter
|
||||
state: present
|
||||
extra_args: --break-system-packages
|
||||
|
||||
- name: Config-Verzeichnis
|
||||
file:
|
||||
path: /etc/pve_exporter
|
||||
state: directory
|
||||
mode: '0700'
|
||||
|
||||
- name: Config deployen
|
||||
template:
|
||||
src: pve.yml.j2
|
||||
dest: /etc/pve_exporter/pve.yml
|
||||
mode: '0600'
|
||||
notify: pve_exporter neustarten
|
||||
|
||||
- name: Systemd Service
|
||||
copy:
|
||||
dest: /etc/systemd/system/pve-exporter.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Prometheus PVE Exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/pve_exporter --config.file /etc/pve_exporter/pve.yml --web.listen-address 0.0.0.0:{{ pve_exporter_port }}
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
notify: pve_exporter neustarten
|
||||
|
||||
- name: Service aktivieren und starten
|
||||
systemd:
|
||||
name: pve-exporter
|
||||
enabled: true
|
||||
state: started
|
||||
daemon_reload: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue