proxmox - install into venv
This commit is contained in:
parent
834b1a6d5e
commit
52b7b73a25
@ -70,6 +70,8 @@ prometheus_postgres_exporter_user: "postgres"
|
||||
prometheus_postgres_exporter_password: "changeme_"
|
||||
prometheus_postgres_exporter_port: 5432
|
||||
|
||||
prometheus_proxmox_venv_path: "/opt/venv/prometheus-pve-exporter"
|
||||
|
||||
prometheus_redis_exporter_addr: "redis://localhost:6379"
|
||||
prometheus_redis_exporter_user: ""
|
||||
prometheus_redis_exporter_password: ""
|
||||
|
@ -7,11 +7,22 @@
|
||||
- prometheus_proxmox_exporter_node is defined
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | create dedicated venv path'
|
||||
file:
|
||||
path: "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||
state: directory
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | create dedicated venv'
|
||||
command:
|
||||
cmd: python3 -m venv "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | install package through pip3'
|
||||
pip:
|
||||
name:
|
||||
- prometheus-pve-exporter
|
||||
executable: pip3
|
||||
venv: "{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"
|
||||
tags: ['prometheus_proxmox']
|
||||
|
||||
- name: 'proxmox exporter | configuration'
|
||||
|
@ -5,6 +5,6 @@ Wants=network.target
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
ExecStart=/usr/local/bin/pve_exporter --config.file /etc/default/prometheus-proxmox-exporter --web.listen-address {{ prometheus_proxmox_exporter_node }}:{{ prometheus_proxmox_exporter_port | default('9221') }}
|
||||
ExecStart="{{ prometheus_proxmox_venv_path | default('/opt/venv/prometheus-pve-exporter') }}"/bin/pve_exporter --config.file /etc/default/prometheus-proxmox-exporter --web.listen-address {{ prometheus_proxmox_exporter_node }}:{{ prometheus_proxmox_exporter_port | default('9221') }}
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user