mirror of
https://github.com/roles-ansible/ansible_role_prometheus_ping_exporter.git
synced 2024-08-16 10:19:51 +02:00
improve systemd workflow
This commit is contained in:
parent
125a2823d2
commit
b8c301413d
3 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Systemctl restart ping_exporter.service
|
- name: Systemctl restart ping_exporter.service
|
||||||
ansible.builtin.debug:
|
become: true
|
||||||
msg: "in progress..."
|
ansible.builtin.systemd:
|
||||||
|
name: 'ping_exporter.service'
|
||||||
|
state: 'restarted'
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
# {{ ansible_managed }}
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Execute the ping_exporter server.
|
Description=Execute the ping_exporter server.
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=simple
|
||||||
WorkingDirectory={{ ping_exporter__user_home }}
|
WorkingDirectory={{ ping_exporter__user_home }}
|
||||||
|
User={{ ping_exporter__user }}
|
||||||
|
Group={{ ping_exporter__group }}
|
||||||
ExecStart=/usr/bin/ping_exporter --config.path {{ ping_exporter__user_home }}/ping_exporter_config.yml
|
ExecStart=/usr/bin/ping_exporter --config.path {{ ping_exporter__user_home }}/ping_exporter_config.yml
|
||||||
|
AmbientCapabilities=CAP_NET_RAW
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -3,5 +3,5 @@ ping_exporter__repo: 'https://github.com/czerwonk/ping_exporter.git'
|
||||||
ping_exporter__repo_api: 'https://api.github.com/repos/czerwonk/ping_exporter/releases/latest'
|
ping_exporter__repo_api: 'https://api.github.com/repos/czerwonk/ping_exporter/releases/latest'
|
||||||
|
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 03 # should be a integer
|
playbook_version_number: 04 # should be a integer
|
||||||
playbook_version_path: 'do1jlr.prometheus_ping_exporter.version'
|
playbook_version_path: 'do1jlr.prometheus_ping_exporter.version'
|
||||||
|
|
Loading…
Reference in a new issue