add role adc_exporter_ping

add role switch_rule
This commit is contained in:
fumingwei
2020-12-15 14:54:35 +06:00
parent 424e66ecdb
commit 5b2a048fbb
9 changed files with 394 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
- name: "mkdir /opt/adc-exporter/"
file:
path: /opt/adc-exporter/
state: directory
- name: "copy ping_exporter"
copy:
src: '{{ role_path }}/files/ping_exporter'
dest: /opt/adc-exporter/ping_exporter
mode: 0755
- name: "templates ping_exporter.service"
template:
src: "{{role_path}}/templates/adc-exporter-ping.service.j2"
dest: /usr/lib/systemd/system/adc-exporter-ping.service
tags: template
- name: 'adc-exporter-ping service start'
systemd:
name: adc-exporter-ping
enabled: yes
daemon_reload: yes
state: restarted