mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 21:30:24 +00:00
1173d1ada7
Signed-off-by: gardar <gardar@users.noreply.github.com>
29 lines
881 B
YAML
29 lines
881 B
YAML
---
|
|
- name: Configure
|
|
ansible.builtin.include_role:
|
|
name: prometheus.prometheus._common
|
|
tasks_from: configure.yml
|
|
vars:
|
|
_common_system_user: "{{ snmp_exporter_system_user }}"
|
|
_common_system_group: "{{ snmp_exporter_system_group }}"
|
|
_common_config_dir: "{{ snmp_exporter_config_dir }}"
|
|
tags:
|
|
- snmp_exporter
|
|
- configure
|
|
- snmp_exporter_configure
|
|
|
|
- name: Copy configuration file
|
|
ansible.builtin.template:
|
|
src: "{{ snmp_exporter_config_file | default(snmp_exporter_local_cache_path ~ '/snmp.yml', true) }}"
|
|
dest: "{{ snmp_exporter_config_dir }}/snmp.yml"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
|
notify:
|
|
- reload snmp_exporter
|
|
become: true
|
|
tags:
|
|
- snmp_exporter
|
|
- configure
|
|
- snmp_exporter_configure
|