This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
services/_ansible/roles/telegraf/tasks/main.yml

23 lines
604 B
YAML

---
- 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"
register: cmd_result
- name: Set the docker force-recreate flag
ansible.builtin.set_fact:
docker_force_recreate: "--force-recreate"
when: cmd_result.changed
- import_tasks: steps/start-service.yml