Add role for snmp_exporter
This commit is contained in:
27498
roles/snmp_exporter/templates/snmp.yml.j2
Normal file
27498
roles/snmp_exporter/templates/snmp.yml.j2
Normal file
File diff suppressed because it is too large
Load Diff
21
roles/snmp_exporter/templates/snmp_exporter.service.j2
Normal file
21
roles/snmp_exporter/templates/snmp_exporter.service.j2
Normal file
@ -0,0 +1,21 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=SNMP Exporter
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User={{ snmp_exporter_user_name }}
|
||||
Restart=on-failure
|
||||
ExecStart={{ snmp_exporter_bin_path }} \
|
||||
{% for arg in snmp_exporter_bin_args %}
|
||||
{{ arg }} {% if not loop.last %}\{{ "\n"}}{% endif %}
|
||||
{% if loop.last %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
WorkingDirectory={{ snmp_exporter_var_dir_path }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user