Add telegraf to ansible
This commit is contained in:
parent
565509a5a9
commit
90064091ea
8 changed files with 81 additions and 2 deletions
_ansible/roles/telegraf/tasks
16
_ansible/roles/telegraf/tasks/main.yml
Normal file
16
_ansible/roles/telegraf/tasks/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- name: Deploy {{ svc.name }}
|
||||
tags:
|
||||
- telegraf
|
||||
- monitoring
|
||||
block:
|
||||
- import_tasks: steps/create-service-directory.yml
|
||||
- import_tasks: steps/template-docker-compose.yml
|
||||
|
||||
- name: Template config
|
||||
ansible.builtin.template:
|
||||
src: telegraf.conf.j2
|
||||
dest: "{{ (service_path, 'telegraf.conf') | path_join }}"
|
||||
mode: "0664"
|
||||
|
||||
- import_tasks: steps/start-service.yml
|
Reference in a new issue